Fix uglify removing source map

box-drawing
cpsdqs 7 years ago
parent 3dcb3fe972
commit aca60da67d
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 6
      webpack.config.js

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

Loading…
Cancel
Save