Skip to content

Commit

Permalink
webpack.config.js: Enable source map in prod
Browse files Browse the repository at this point in the history
This will provide better stack trace. Also use
`cheap-module-source-map` in development to speed up build.

Closes #151
  • Loading branch information
blazeu committed Aug 10, 2018
1 parent a71904f commit ec19e22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
filename: 'bundle.js'
},
context: path.resolve(__dirname),
devtool: isBuild ? false : 'source-map',
devtool: isBuild ? 'source-map' : 'cheap-module-source-map',
module: {
rules: [
{
Expand Down Expand Up @@ -65,6 +65,8 @@ module.exports = {
REPOSITORIES: JSON.stringify(process.env['REPOSITORIES']),
}),
new ExtractTextPlugin('app.css'),
new UglifyJsPlugin()
new UglifyJsPlugin({
sourceMap: true,
})
] : []
};

0 comments on commit ec19e22

Please sign in to comment.