angular-cli
angular-cli copied to clipboard
Differential loading produces ES5 for new Edge with Yarn
🐞 Bug report
Command (mark with an x)
- [ ] new
- [x] 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
- Create new empty project:
npx -p @angular/cli ng new edge - Replace browserslist content with only one line (Edge 79/80)
last 2 Edge versions - Remove node_modules and lock files, install dependencies from scratch by NPM:
npm i npm run ng build --prod - Build the project (no ES5 bundle):

- Do the same for Yarn, remove node_modules:
yarn yarn ng build --prod - Build the project (ES5 bundle generated):

🌍 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?
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' ]
Does this also cause that edge will load the 2015 modules? And thus crash with destructuring?
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.