Skip to content

Break the sourceMappingURL string to avoid confusing Chrome. #132

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

Closed
wants to merge 1 commit into from

Conversation

kring
Copy link

@kring kring commented Jul 8, 2016

We recently started seeing "Failed to load SourceMap" problems loading in our app in Chrome 51. I eventually tracked it down to this line in style-loader's addStyles.js:

css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";

I suspect that Chrome is incorrectly interpreting this as an actual sourcemap reference. In any case, breaking up the sourceMappingURL solved the problem for us, so I hope you might consider merging this simple workaround!

For what it's worth, the problem does not occur in Chrome Canary, but that's not expected to hit stable until September or October.

@michael-ciniawsky
Copy link
Member

Related #181

@michael-ciniawsky
Copy link
Member

@kring Current direction seems to be solving this in source-map-loader itself, please join discussion in #181

@ekulabuhov
Copy link
Member

Filed against Chrome 51. It seems to be fixed now since version 52 (according to dvdzkwsk/react-redux-starter-kit#858 (comment)). Probably can be closed?

@michael-ciniawsky
Copy link
Member

Closed in favour of #181 or direct fix in source-map-loader also proposed in #181

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 this pull request may close these issues.

3 participants