ng serve compiles my app, but when I'm inspecting the html, the source of the CSS seems to be (style)...(/style). Does anybody knows how to configure sass source map via Angular-CLI ?
-
codementor.io/stevebelovarich/…anshuVersatile– anshuVersatile2017-01-23 14:19:15 +00:00Commented Jan 23, 2017 at 14:19
-
@anshuVersatile that post is now out of date (according to the author in the post comments)hellsgate– hellsgate2017-03-14 09:58:37 +00:00Commented Mar 14, 2017 at 9:58
-
Possible duplicate of How to Source Map Angular CLI css files in Chrome Dev Tools?Francesco Borzi– Francesco Borzi2017-08-16 15:55:35 +00:00Commented Aug 16, 2017 at 15:55
Add a comment
|
1 Answer
When you type ng serve by default angular cli doesn't include sourcemaps files for css files but you can include it by typing this command
ng serve -sm -ec
or
ng serve --sourcemap --extractCss
I use Angular Cli -v 1.0.3, and More information - Angular CLI special cases
Perhaps, its help you.
5 Comments
Francesco Borzi
on AngularCLI 1.3.0
ng serve -sm -ec works, but ng serve --sourcemap --extractCss doesn't.Serhiy Koziuk
Hi, ShinDarth. Very strange. I updated AngularCLI 1.3.2 and all works.
phip1611
It's not camel case. It's --extract-css
Saad Benbouzid
@phip1611 : there are multiple aliases : --extract-css (Boolean) Extract css from global styles onto css files instead of js ones. aliases: -ec, --extractCss
ryanm
Per comment in stackoverflow.com/a/40224003/3232832, seems as of Dec 2018, NG CLI still cannot properly link to the exact / original SCSS line. However, with the method in this answer, it can at least show you the right line of CSS, which can then be searched for.