-
Notifications
You must be signed in to change notification settings - Fork 517
Plugin overwrites source maps generated by other plugins #119
Comments
I check the generated code and there is actually no TypeScript source map anymore. But Chrome seems to find one!? |
I have the same problem using stylus for css and babel with es6. Everything's fine if I disable the plugin. |
Same issue with babel-loader and ExtractTextPlugin. Enabling extract-text outputs this as the sourcemap: {"version":3,"sources":[],"names":[],"mappings":"","file":"styles.css","sourceRoot":""} |
+1 |
1 similar comment
+1 |
+1 |
1 similar comment
+1 |
Could you please create a small repro repo so I can test it? |
@paulshen and I just did this and discovered that it was our use of |
@elsigh - confirmed that was my issue too. Thanks for posting that 👍 |
Thanks @elsigh, this fixed it for me as well.. I changed |
+1 |
+1 Thanks @elsigh so smart! |
This one is so hard to track down on a big webpack config. It should be big over the README.md |
The ExtractTextPlugin has a bug that breaks sourcemaps when you don't use [file]. See webpack-contrib/extract-text-webpack-plugin#119
It's correcting to use [file] instead [name] in order to support work together with ExtractTextPlugin souremaps Inspired by: webpack-contrib/extract-text-webpack-plugin#119
Thank you so much @jamesthurley && @elsigh ! this was indeed the issue and the shared fix worked perfectly for me. Cheers! 🍻 |
omg thank you!!!!!! |
wasted few hours on this. Thanks @elsigh |
More kudos to @elsigh -- that was our issue too! |
I still have this issue and none of the above solutions work for me |
ok so i fixed it by adding: ...
output: {
sourceMapFilename: '[file].map'
}
... now it outputs |
The same behavior with empty css source map:
Happens because of purifycss-webpack plugin, spent about 30 mins demystifying. Hope it helps someone. |
Thanks @dvakatsiienko, I have the same problem and after omitting purifycss-webpack (move to production), problem solved. |
The same behavior with empty css source map: {"version":3,"sources":[],"names":[],"mappings":"","file":"styles-less.css","sourceRoot":"webpack:///"} /# sourceMappingURL=styles-less.css.map/ Happens because of |
DEPRECATED |
I am using
ts-loader
and it generates the correct source maps. But when I addExtractTextPlugin
as a plugin somthing goes horribly wrong with the creation of the source maps.Here is the relevant part of my setup:
With the
ExtraTextPlugin
enabled I get links to the TypeScript source liketest.scss:7
. Which is obviously not really the correct file ;-D If I disable the plugin (viadisable: true
) everything works fine (as long as I am using thesource-map
option).I also removed the
sourceMap
param from the css and sass loader. But even then the source files are broken. With this setting they link to the compiled JS instead to the TypeScript files.Did anyone encounter the same problem?
The text was updated successfully, but these errors were encountered: