Open david10sing opened 1 year ago
Can you provide a minimal repo that reproduces this issue?
Hi @nex3
Here is a link to a reproduction repo
https://github.com/david10sing/minified-sass-breaking-sourcemap
That repro looks like it passes the Sass output, including the sourcemap, through PostCSS. Can you reproduce it with Sass alone?
Hi @nex3
Removed the postcss processing.
As you will see, it has the same issue. I also renamed the class names so it's clearer. .index
should come from index.scss
but is instead pointing to _test.scss
I can't reproduce that. Here's what I did:
$ git clone https://github.com/david10sing/minified-sass-breaking-sourcemap
$ cd minified-sass-breaking-sourcemap
$ npm i
$ mkdir dist
$ node sass-compiler.js
I then opened https://sokra.github.io/source-map-visualization/ and uploaded the generated index.css
and index.css.map
files. The .index
class is clearly mapped to the correct location in index.scss
.
@nex3
It's not in chrome devtools inspector
That sounds like a bug in the chrome devtools inspector. Have you tried reporting it there?
Thank you @nex3
Reported ☝️
@david10sing That is not the right place for chrome bugs, please follow instructions on this page: https://www.chromium.org/for-testers/bug-reporting-guidelines/
Context
I am experiencing an issue when using the JS API,
sourcemap
compile option when used in tandem withstyle = compressed
.The source map is produced and I write it to a file. However, the mappings are broken and in Chrome's devtools, I am seeing styles pointing to the wrong file.
Screenshots
Wrong
Correct
Question