我已经搭建了脚手架AspNetCore Angular 6.0 SPA template
from cli
然后安装npm
相应地进行封装。
但是当我尝试运行该项目时dotnet run
它不会启动,而是提示错误。我截取了一个屏幕截图供您参考。我不确定这是否与angular.Json
文件或其他!任何想法..
Error:
未知选项--extractCss
这是因为ng serve
命令不再支持--extractCss
option
Open package.json
。你会找到
{
"scripts": {
"start": "ng serve --extract-css" // Please remove the --extract-css
// ...
}
}
去除--extract-css
from start
脚本。
将会是现在
{
"scripts": {
"start": "ng serve"
// ...
}
}
现已开放angular.json
. set "extractCss": true
in build
配置
example:
"build": {
"architect": {
"configurations": {
"extractCss": true,
//...
}
}
}
}
参考: https://github.com/angular/angular-cli/issues/10666#issuecomment-386843570 https://github.com/angular/angular-cli/issues/10666#issuecomment-386843570
参考资料2: http://www.talkingdotnet.com/upgrade-angular-5-app-angular-6-visual-studio-2017/ http://www.talkingdotnet.com/upgrade-angular-5-app-angular-6-visual-studio-2017/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)