Unknown option --extractCss in AspNetCore Angular 6.0 SPA Template
This is because the ng serve
command no longer supports --extractCss
option
Open package.json
. You'll find
{ "scripts": { "start": "ng serve --extract-css" // Please remove the --extract-css // ... } }
remove the --extract-css
from start
scripts.
It'll be now
{ "scripts": { "start": "ng serve" // ... } }
Now open angular.json
. set "extractCss": true
in build
configuration
example:
"build": { "architect": { "configurations": { "extractCss": true, //... } } } }
Reference: https://github.com/angular/angular-cli/issues/10666#issuecomment-386843570
Reference 2: http://www.talkingdotnet.com/upgrade-angular-5-app-angular-6-visual-studio-2017/