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

Source map not working for SCSS files

Open rukshandangalla opened this issue 8 years ago • 87 comments

Recently I updated cli version 1.3.2 to 1.6.3 and after that I can't see scss source mapped file in developer tools in Chrome of Firefox .

Versions : 1.6.3

Angular CLI: 1.6.3
Node: 8.9.3
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cli: 1.6.3
@angular/language-service: 4.4.6
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.3
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0

Repro steps

  • Create new angular app using ng new sample-app
  • Add scss file in angular-cli.json "styles": ["styles/styles.scss"]
  • Launch app using ng serve -sm -ec
  • Inspect styles using chrome dev-tools.

Observed behavior

No actual scss file, only style.bundle.css where all the styles compiled. image

Desired behavior

Actual scss file can be seen in the developer tools with the line number image

rukshandangalla avatar Jan 05 '18 03:01 rukshandangalla

Still sourceMap / extractCSS is not working for component specific styles

image

"@angular-devkit/build-angular": "^0.6.8",
"@angular/cli": "^6.0.8",

ritwickdey avatar Oct 01 '18 02:10 ritwickdey

@metasong's solution is working for Angular 6+ projects

waqasdotnet avatar Oct 13 '18 16:10 waqasdotnet

Any update on this? @metasong's solution doesn't work on component style. Pls support LESS source map!!! This is suck a basic feature.

camsong avatar Nov 13 '18 15:11 camsong

@clydin @hansl guys, I believe this is not fixed in version 7.1.0, why close this issue?

camsong avatar Nov 13 '18 15:11 camsong

@camsong It works fine for me in version 7.0.4 This issue only about SCSS source maps.

imkremen avatar Nov 13 '18 18:11 imkremen

It's working for me on version 7.0.3.

JWess avatar Nov 13 '18 20:11 JWess

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.