You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Hey, I've been looking for a way to use CSS sourcemaps in dev with watch or dev-server, which unfortunately means extract-text-webpack-plugins can't be used.
However, I did find out that sourceURL works for inline <style> tags so I'm creating a temporary loader to add that to the end of CSS modules. Could this be done automatically through style-loader? I'd be happy to make a pull request, just let me know if you have any specifics regarding URL naming. Thanks!
(FYI this only seems to work in Chrome, but good enough for now)
The idea with sourceURL is that it would at least give the devtools a name to reference the style tag by, so it would show up in an element's style panel and in the sources panel, even if you don't have sourcemaps (I currently can't use the CSS loader because of a bunch of missing urls; need to keep all that untouched for now).
But it does look like <link> with base64 would also work (tested it out briefly with sourceURL). I'll let you know how it goes. Thanks!
Activity
sokra commentedon Oct 30, 2014
I tried to add SourceMaps to inline
<style>... https://github.com/webpack/style-loader/blob/master/addStyles.js#L98-L103but it doesn't seem to work. You can try to get this working (i. e. try a
<link>with DataUrl).pstoica commentedon Oct 30, 2014
The idea with sourceURL is that it would at least give the devtools a name to reference the style tag by, so it would show up in an element's style panel and in the sources panel, even if you don't have sourcemaps (I currently can't use the CSS loader because of a bunch of missing urls; need to keep all that untouched for now).
But it does look like
<link>with base64 would also work (tested it out briefly with sourceURL). I'll let you know how it goes. Thanks!