Angular CLI“未知选项:'--sourcemap'"错误 [英] Angular CLI "Unknown option: '--sourcemap'" error
本文介绍了Angular CLI“未知选项:'--sourcemap'"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用以下命令在我的 Angular-Sass 项目中启用源映射:
I try to enable source maps in my Angular-Sass project with these commands:
ng serve -sm -ec
ng serve --sourcemap --extract-css
ng serve --sourcemaps=true --extract-css=true
然而,所有这些都会产生未知选项"错误.这些标志都不起作用.
However all of them create "Unknown option" errors. None of these flags work.
我怎样才能做到这一点?
How can I make this work?
这是ng --version
的输出:
Angular CLI: 7.3.0
Node: 8.9.4
OS: linux x64
Angular: 7.1.4
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.8.9
@angular-devkit/build-angular 0.8.9
@angular-devkit/build-optimizer 0.8.9
@angular-devkit/build-webpack 0.8.9
@angular-devkit/core 0.8.9
@angular-devkit/schematics 7.3.0
@angular/cli 7.3.0
@angular/compiler-cli 7.0.4
@ngtools/webpack 6.2.9
@schematics/angular 7.3.0
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.1.6
webpack 4.16.4
推荐答案
调用命令
--source-map=true|false
这篇关于Angular CLI“未知选项:'--sourcemap'"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文