-
-
Notifications
You must be signed in to change notification settings - Fork 429
Description
The README says that you have to use the extract-text-webpack-plugin to get source maps working, however that is not entirely correct. You can get it working that way, but that will make it impossible to get livereload (or hmr) working.
After following the conversion in a closed ticket webpack-contrib/extract-text-webpack-plugin/issues/30, @sokra said that the extract-text plugin is not supposed to be used in development. If you want to get sourcemaps working, you just have to add ?sourceMap to both the css loader, and the scss loader, like this:
{
test: /\.scss$/,
loaders: [ 'style', 'css?sourceMap', 'sass?sourceMap' ]
}
This will allow both live reloading, and sourcemaps to work, without involving the extract-text plugin at all. It does have a bit of a weird file name in Chrome, but clicking on it takes you to the correct file and line number. From my rudimentary testing, the value of the "devtool" flag doesn't seem to effect the generated sourcemaps at all, it works for me with both "eval", "source-map".