angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Styling source maps not working

Open scooterguthrie opened this issue 9 years ago • 19 comments

ng serve -sm -ec

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

scooterguthrie avatar Nov 02 '17 21:11 scooterguthrie

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

gozanohesron avatar Nov 10 '17 06:11 gozanohesron

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

scooterguthrie avatar Nov 10 '17 14:11 scooterguthrie

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.

ermcgrat avatar Nov 11 '17 23:11 ermcgrat

Any update with this issue?

gozanohesron avatar Nov 24 '17 01:11 gozanohesron

Still an issue with the @angular/cli version 1.5.4

ermcgrat avatar Nov 29 '17 20:11 ermcgrat

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

isiegel avatar Dec 08 '17 21:12 isiegel

Same issue here version 1.5.5

kareljan avatar Dec 12 '17 16:12 kareljan

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

ermcgrat avatar Dec 13 '17 15:12 ermcgrat

Oh sweet!

isiegel avatar Dec 13 '17 16:12 isiegel

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.

ermcgrat avatar Dec 13 '17 16:12 ermcgrat

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

isiegel avatar Dec 13 '17 17:12 isiegel

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

rukshandangalla avatar Jan 04 '18 12:01 rukshandangalla

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"

smlombardi avatar Jan 16 '18 14:01 smlombardi

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 avatar Mar 09 '18 20:03 clabough

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

smlombardi avatar Apr 16 '18 15:04 smlombardi

I seem to be having the same issue with version 1.7.3

Brookke avatar May 17 '18 14:05 Brookke

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"

ermcgrat avatar May 21 '18 14:05 ermcgrat

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.

alan-agius4 avatar Oct 11 '18 09:10 alan-agius4

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.