Categories
Programming

Lost your sourcemaps after upgrading to Webpack 2?

While migrating an application from Webpack 1 to the latest and greatest version 2, I noticed that our sourcemaps were gone. Even though I had set the correct devtool values in my Webpack configs.

After some (read lots) of debugging, I found that the UglifyJsPlugin plugin changed its default behaviour and nowadays you need to include the  { sourceMap: true } option when configuring it.