-
Notifications
You must be signed in to change notification settings - Fork 513
fix: source map sources names #258
Comments
Sorry, forgot to mention the version of the tools: |
Relevant issue in |
Closing due to old webpack version. If your issue persists, feel free to re-open. |
i still have the same issue with webpack2 |
Are you seeing this with the most recent version of this plugin? |
Hi @scottdj92.
sourceMap sources path are in the form Anyway it looks like the problem is still caused by css-loader that force a 'wrong' sourceRoot. I created a PR there webpack-contrib/css-loader#430 to fix the issue. edited: updated PR link |
Fixed webpack-contrib/css-loader#430. Feel free to feedback and reopen if problem still exists. Thanks! |
I want to generate an external CSS file with a source map when I build my application, so I use the following Webpack configuration, as documented in the README:
However, the
sources
names are not generated properly in the.map
file: they are formatted aswebpack:///webpack:///dashboard.css
, which is a bit strange.I've tried to understand what's going on, but I'm a bit lost.
The
css-loader
issues asourceRoot
with valuewebpack://
which is probably a part of the cause. But it's not necessarily bad if there's no other loader consuming the output ofcss-loader
, not sure.Then, the different source maps are assembled with
webpack-sources
helpers. If I printsource.map()
afterrenderExtractedChunk
, the sources are formatted aswebpack:///dashboard.css
But, I guess webpack is probably adding another
webpack:///
prefix due to thedevtoolModuleFilenameTemplate
config, but I don't understand how it is achieved after the previous operation.I'm sure sure how the problem could be solved. Maybe we should file a bug/feature request to the
css-loader
project in order to allow anothersourceRoot
? Maybe there's another way to assemble the source maps in the Extract text plugin to avoid the problem? Maybe the bug is inwebpack-sources
helpers? Any idea?The text was updated successfully, but these errors were encountered: