Angular-cli: Styling source maps not working

Created on 2 Nov 2017  路  19Comments  路  Source: angular/angular-cli

ng serve -sm -ec

Source Maps do not work in CLI version 1.5.0.... however they work fine in 1.4.7

1 (urgent) bufix

Most helpful comment

Just updated to 1.6.4 to move our app to Angular 5. Now source maps no longer working.

Running with "ng serve --sourcemap --extractCss -o --hmr -e=hmr --proxy-config proxy.config.json"

All 19 comments

Source maps is linked only to the generated style.bundle.css

Settings for my angular-cli.json is this

image

Here's what I am getting:

image

Here's my package

image

Yes, same issue I'm getting. Thanks for taking the time to give the additional details!

Same.

I'm using the cli version 1.5.0.

ng new test-app
cd test-app
ng serve -sm -ec -v

Confirm no source maps generated. Older versions of the cli seem to work fine.

Any update with this issue?

Still an issue with the @angular/cli version 1.5.4

Would love to get source maps working again for Angular CLI; very helpful.

Same issue here version 1.5.5

Hey, it looks like it is fixed now in version 1.6.0!!

Oh sweet!

I stand corrected. It looks like if your components have any styles defined with "styleUrls", those will be mapped. However, if you have any global "styles" defined in your angular-cli.json, those will not get mappings.

Essentially, you can still reproduce this easily by creating a new project:

ng new --style scss test-app
cd test-app
ng serve -sm -ec -v

Now any style you define in the main styles.scss will not be mapped. However, any style you define in app.component.scss will be mapped.

Oh well, usually I don't have any styles defined within components. Maybe a future release.

Still have the issue in "@angular/cli": "^1.6.3"
Any update on this?

Just updated to 1.6.4 to move our app to Angular 5. Now source maps no longer working.

Running with "ng serve --sourcemap --extractCss -o --hmr -e=hmr --proxy-config proxy.config.json"

Wow, I spent a lot of time tracking my build issue down to [styleUrls].

This is still an issue with 1.7.3.

ng new test
cd test
ng build --prod -sm

^This will complete

Put any style in the app.component.css

ng build --prod -sm

^ this will hang at 95% emitting

This looks related to #9099

@clabough Your issue is completely different from the posted issue, which is that source maps are not linking to their scss files.

I seem to be having the same issue with version 1.7.3

Source maps still don't work correctly in version 6 of the Angular CLI.

Additionally, it looks like --extract-css has been removed as a parameter to "ng serve", and only works with "ng build"

I'm sorry, but we can't reproduce the problem following the instructions you provided. In an ng new application it looks like it's working correctly.
image

Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue.
Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.

If the problem persists, please open a new issue following our submission guidelines.

A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmurphzyo picture jmurphzyo  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments

hartjo picture hartjo  路  3Comments

daBishMan picture daBishMan  路  3Comments

delasteve picture delasteve  路  3Comments