Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differential loading produces ES5 for new Edge with Yarn #17070

Closed
1 of 15 tasks
anton-gorbikov opened this issue Feb 25, 2020 · 3 comments
Closed
1 of 15 tasks

Differential loading produces ES5 for new Edge with Yarn #17070

anton-gorbikov opened this issue Feb 25, 2020 · 3 comments
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@anton-gorbikov
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

Depending on package manager (NPM or Yarn) Angular CLI treats Edge 79/80 as ES2015 (NPM) or ES5 (Yarn) compatible browser.

🔬 Minimal Reproduction

  1. Create new empty project:
    npx -p @angular/cli ng new edge
    
  2. Replace browserslist content with only one line (Edge 79/80)
    last 2 Edge versions
    
  3. Remove node_modules and lock files, install dependencies from scratch by NPM:
    npm i
    npm run ng build --prod
    
  4. Build the project (no ES5 bundle):
    image
  5. Do the same for Yarn, remove node_modules:
    yarn
    yarn ng build --prod
    
  6. Build the project (ES5 bundle generated):
    image

🌍 Your Environment


$ ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 9.0.3
Node: 13.7.0
OS: win32 x64

Angular: 9.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.3
@angular-devkit/build-angular     0.900.3
@angular-devkit/build-optimizer   0.900.3
@angular-devkit/build-webpack     0.900.3
@angular-devkit/core              9.0.3
@angular-devkit/schematics        9.0.3
@angular/cli                      9.0.3
@ngtools/webpack                  9.0.3
@schematics/angular               9.0.3
@schematics/update                0.900.3
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Done in 1.22s.

yarn version v1.21.1

Anything else relevant?

@alan-agius4
Copy link
Collaborator

This seems to be caused by dependency hoisting issues and the inconsistency between yarn and npm.

last 2 Edge versions in npm will return  [ 'edge 78', 'edge 80' ]
last 2 Edge versions in yarn will return  [ 'edge 18', 'edge 17' ]

@alan-agius4 alan-agius4 added area: @angular/cli needs: discussion On the agenda for team meeting to determine next steps severity3: broken labels Feb 25, 2020
@ngbot ngbot bot modified the milestone: needsTriage Feb 25, 2020
@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely labels Feb 25, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Feb 25, 2020
@dgp1130 dgp1130 removed the needs: discussion On the agenda for team meeting to determine next steps label Mar 5, 2020
@kyliau kyliau closed this as completed in 21a25ee Mar 5, 2020
kyliau pushed a commit that referenced this issue Mar 5, 2020
@sandrooco
Copy link

Does this also cause that edge will load the 2015 modules? And thus crash with destructuring?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests

4 participants