angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

File .browserslistrc not being used

Open nicky-lenaers opened this issue 9 years ago • 7 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.3.2
node: 8.2.1
os: win32 x64
@angular/animations: 4.3.6
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/platform-server: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.3.2
@angular/compiler-cli: 4.3.6
@angular/language-service: 4.3.6
@angular/service-worker: 1.0.0-beta.16
@ngtools/webpack: 1.6.2

Repro steps.

According to the Stories Browserslist I should be able to add custom browser support for CSS properties. So:

  1. Add a .browserslistrc file in the project root
  2. Add the following content in the .browserslistrc file:
### Supported Browsers

not ie <= 11
not Edge <= 16

For confirmation, see the Can I Use refernce for e.g. grid-column which states that IE 11 and Edge 15, 16 needs -ms- prefix, which are both now excluded. 3. Write a rule with grid-column: 4 in one the project stylesheets. 4. Compile using ng build --prod 5. Check out the styles.<hash>.bundle.css file in your dist folder. It includes -ms-grid-column: 4

The log given by the failure.

Desired functionality.

The .browserslistrc file should be picked up by the Angular CLI.

Mention any other details that might be useful.

nicky-lenaers avatar Sep 13 '17 07:09 nicky-lenaers

@Brocco Will this make it into 1.5.0 release by any chance?

nicky-lenaers avatar Oct 24 '17 11:10 nicky-lenaers

I confirm the issue; the workaround is to use the package.json entry (as described in https://github.com/angular/angular-cli/wiki/stories-autoprefixer, that one works).

mgol avatar Oct 27 '17 10:10 mgol

@mgol Perfect, thank your for confirming and providing a workaround, that's great. Looking forward to a fix!

nicky-lenaers avatar Oct 27 '17 12:10 nicky-lenaers

Why write about this feature in the documentation if it doesn't work? I spent an hour trying it out before I found this issue. 👎

belyan avatar Mar 07 '18 17:03 belyan

It looks like this one is already fixed. At least it works for me in Angular CLI: 6.2.3

anton-gorbikov avatar Sep 28 '18 12:09 anton-gorbikov

@anton-gorbikov Correct, it works in the current version. Thanks for the heads-up, closing this issue.

nicky-lenaers avatar Sep 28 '18 13:09 nicky-lenaers

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.