|
|
@ -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: { |
|
|
|