[6.0.0-rc7] "ng serve --extract-css" does not work anymore
See original GitHub issueng serve --extract-css
seems to be not working anymore with the new version 6 of angular-cli.
ng build--extract-css
works without a problem, so why isn’t the option available with serve as well?
Versions
Angular CLI: 6.0.0-rc.7
Node: 10.0.0
OS: win32 x64
Angular: 6.0.0-rc.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.5.10
@angular-devkit/build-angular 0.5.10
@angular-devkit/build-optimizer 0.5.10
@angular-devkit/core 0.5.10
@angular-devkit/schematics 0.5.10
@angular/cli 6.0.0-rc.7
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.0-rc.8
@schematics/angular 0.5.10
@schematics/update 0.5.10
rxjs 6.0.0
typescript 2.7.2
webpack 4.6.0
Repro steps
simply run ng serve --extract-css
and it does not work.
Observed behavior
> ng serve --extract-css
Unknown option: '--extractCss'
Desired behavior
ng serve
should accept the --extract-css
option as it did back with 1.7.4.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:16 (3 by maintainers)
Top Results From Across the Web
[6.0.0-rc7] "ng serve --extract-css" does not work anymore -
ng serve --extract-css seems to be not working anymore with the new version 6 of angular-cli. ng build--extract-css works without a problem, ...
Read more >Extracting CSS into JS with Angular 11 (deprecated extractCss)
This means that we don't use styles.js anymore during the application build. ... Removing extractCss in angular.json solves the problem.
Read more >What's new in Angular CLI 11.0? | Ninja Squad
The CLI has been supported ng serve --hmr for quite some time, but it used to require to change code in your application...
Read more >Angular Taiwan | 大家覺得ng serve 需要--extract-css 這個參數嗎
ng serve --extract-css seems to be not working anymore with the new version 6 of angular-cli. ng build--extract-css works without a problem, ...
Read more >Angular CLI - Quick Guide - Tutorialspoint
To create a new project, we can run the following command in the command line and the project will be created. ng new...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You missed the whole point of this an similar issues: that angular.json is a bewildering, confusing an poorly documented (especially in terms of annotated examples) subtitute for the old, relibable ng serve and ng build command-line options.
You also ignore the need for separate production vs. development/debug sets of options in a quick, painless manner. This is easy to do via package.json by adding/removing simple, well-documented (at least it was in 1.7) options such as -extract-css on ng serve (which performs a build). Try doing that via multiple configurations in less than 60 seconds via the confusing “JSON blizzard” known as angular.json.
Please reconsider this poor decision to close this issue.
just add “extractCss”: true at projects > SPA6 > architect > build > options