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 }}
Repository navigation
Breakpoints not working after adding sourcemaps in 0.8.x #1186
I fixed my problem by adding new webpack.EvalSourceMapDevToolPlugin() to the plugin sections of both the development and production configs. After doing that, I am able to set and hit breakpoints in the ES6 source in Chrome DevTools.
Heh. I was debating whether to file an issue or not, but it was late and I was curious if @TheLarkInn had anything to say first.
I see that #1188 is tagged for 0.8.2, so I'll look forward to that. Thanks for looking into this!
(Side note: having looked at the Webpack 1.x code for handling the devtool config option, what it actually does is parse strings like "#cheap-module-inline-source-map", and turn that into several distinct variables, such as the prefix character, inline vs eval, etc. Part of that process is deciding whether to use SourceMapPlugin or EvalSourceMapPlugin. Also, manually adding a sourcemap plugin instance to the plugins array will wind up overriding the one created from the devtool option as far as I've seen.)
Activity
AlmeroSteyn commentedon Dec 7, 2016
I had exactly the same issue today.
I fixed my problem by adding
new webpack.EvalSourceMapDevToolPlugin()to the plugin sections of both the development and production configs. After doing that, I am able to set and hit breakpoints in the ES6 source in Chrome DevTools.Found the solution in the post here.
If this is an accepted fix I can submit a pull request.
gaearon commentedon Dec 7, 2016
Thanks for the comment. That feels like an odd fix so I'd rather not apply it without a full understanding of why this works.
But if you can reproduce this in your project, can you try updating Webpack to 1.14.0? It should contain a fix for a possibly related issue.
AlmeroSteyn commentedon Dec 7, 2016
@gaearon Upgrading to 1.14.0 seems to work for me.
markerikson commentedon Dec 7, 2016
Heh. I was debating whether to file an issue or not, but it was late and I was curious if @TheLarkInn had anything to say first.
I see that #1188 is tagged for 0.8.2, so I'll look forward to that. Thanks for looking into this!
(Side note: having looked at the Webpack 1.x code for handling the
devtoolconfig option, what it actually does is parse strings like"#cheap-module-inline-source-map", and turn that into several distinct variables, such as the prefix character, inline vs eval, etc. Part of that process is deciding whether to use SourceMapPlugin or EvalSourceMapPlugin. Also, manually adding a sourcemap plugin instance to the plugins array will wind up overriding the one created from thedevtooloption as far as I've seen.)