Skip to content

browserslist have to be now on project root #14660

@microspa

Description

@microspa

🐞 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: 7.2.15

Description

In Angular 8 the file "browserslist" is expected in project root folder.

🔬 Minimal Reproduction

  • Use the default project structure from Angular 7 or below which was generated by cli. The file browserslist is under src/.
  • Upgrade to Angular 8
  • Change browserslist content to:

0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11
not samsung 4
not android 4.4.3-4.4.4
not last 2 ie_mob versions
not last 2 op_mini versions
not last 2 op_mob versions
not last 2 baidu versions
not last 2 kaios versions
not last 2 and_uc versions
not last 2 and_qq versions
not last 2 edge versions
not chrome 49

  • Nothing happens on build --prod
  • Move browserslist to project root
  • Differential loading is now disabled on build because the function isEs5SupportNeeded can now access browserslist and is not using defaults

🔥 Exception or Error

Unfortunately no hint or warning

🌍 Your Environment

Angular Version:


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

Angular CLI: 8.0.1
Node: 12.3.1
OS: linux x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?
For me, it was difficult to say that this is really a bug because the solution can be:

  • Documentation for it on https://update.angular.io/#7.2:8.0
  • ng update @angular/cli @angular/core will move the file to project root
  • There is an hint or warning on cli prompt
  • @angular-devkit/build-angular/src/utils/differential-loading.ts and all other implementations of browserslist(....) will check src folder too

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions