9

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?

This is the output of 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

1 Answer 1

17

The command is called

--source-map=true|false

https://angular.io/cli/build

Sign up to request clarification or add additional context in comments.

1 Comment

In the referenced link, its --source-map and not --sourceMap as of 4/21.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.