Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with hard-coded sourceRoot #373

Closed
RandScullard opened this issue Nov 9, 2016 · 1 comment · Fixed by #430
Closed

Problem with hard-coded sourceRoot #373

RandScullard opened this issue Nov 9, 2016 · 1 comment · Fixed by #430

Comments

@RandScullard
Copy link

I'm using css-loader (with sass-loader), and I'm finding that CSS source maps are not working in Chrome or Firefox. The generated CSS is being dynamically inserted by style-loader, and in the Chrome developer tools Styles panel, all of the source links look like this:

blob:http://localhost:8080/022723dd-255f-4c67-8da3-486c82cba226

When clicked, these links take me to the generated CSS and not the original source SCSS file.

It seems as if this problem is related to the hard-coded sourceRoot being set by css-loader (https://github.com/webpack/css-loader/blob/master/lib/loader.js#L106):

map.sourceRoot = "webpack://";

Chrome doesn't seem to know how to interpret this and find the source files, and I can't see any way to override this sourceRoot, so I tried temporarily changing that line of code to this:

map.sourceRoot = "http://localhost:8080";

...and the source maps started working. Am I missing something or is this a problem with css-loader?

@renatorib
Copy link

renatorib commented Feb 10, 2017

Same issue here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants