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

The paths for SCSS SourceMaps generated are wrong

Open ilawton opened this issue 3 years ago • 3 comments

Source Maps for SCSS/CSS files aren't generated correctly and thus can't be used with Chrome Dev Tools. The path is wrong and when clicking the link in chrome you get a 404, and the path is totally wrong. Thus rendering source maps useless for development...

I "think" sourceMapRoot isn't being set correctly for node-sass in your stencil-styles package: https://github.com/sass/node-sass#sourcemaproot

Would be really nice to have this sorted so we can use source maps as intended. Thanks.

ilawton avatar Jun 29 '21 13:06 ilawton

I just bumped into this same problem. I'm debugging a pretty complex template and would be nice if I can write the changes to the filesystem or open the scss directly on vscode, but because the path in the sourcemaps seems to be a mix between relative and absolute paths, the browser never finds the source file.

druellan avatar Apr 08 '22 13:04 druellan

+1 same issue being hit. Warnings in chrome dev for maps not being correct. I'll be taking a deeper look this week and will report back on any fixes I find

ImTheDeveloper avatar May 08 '22 06:05 ImTheDeveloper

On the current latest version of stencil-cli, version 7.2, the line numbers being reported in chrome dev tools are always for the parent selector at the root level of the file when inspecting a nested rule. We didn't have that problem on the older versions of stencil-cli. I would definitely be nice to get this working properly.

pvaladez avatar Aug 23 '23 23:08 pvaladez