diff --git a/webpack.config.js b/webpack.config.js index 853de82..3b79b40 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ const path = require('path') let hash = execSync('git rev-parse --short HEAD').toString().trim() -let plugins = [new webpack.optimize.UglifyJsPlugin()] +let plugins = [] let devtool = 'source-map' if (process.env.ESP_PROD) { @@ -15,6 +15,10 @@ if (process.env.ESP_PROD) { devtool = '' } +plugins.push(new webpack.optimize.UglifyJsPlugin({ + sourceMap: devtool === 'source-map' +})) + module.exports = { entry: './js', output: {