Skip to content

Differential loading produces ES5 for new Edge with Yarn #17070

@anton-gorbikov

Description

@anton-gorbikov

🐞 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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions