|
|
@ -8,6 +8,9 @@ const CompressionPlugin = require('compression-webpack-plugin') |
|
|
|
const sharedConfig = require('./shared.js') |
|
|
|
const sharedConfig = require('./shared.js') |
|
|
|
|
|
|
|
|
|
|
|
module.exports = merge(sharedConfig, { |
|
|
|
module.exports = merge(sharedConfig, { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
devtool: 'source-map', // separate sourcemap file, suitable for production
|
|
|
|
|
|
|
|
|
|
|
|
output: { filename: '[name]-[chunkhash].js' }, |
|
|
|
output: { filename: '[name]-[chunkhash].js' }, |
|
|
|
|
|
|
|
|
|
|
|
plugins: [ |
|
|
|
plugins: [ |
|
|
@ -19,7 +22,7 @@ module.exports = merge(sharedConfig, { |
|
|
|
comments: false |
|
|
|
comments: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
sourceMap: false |
|
|
|
sourceMap: true |
|
|
|
}), |
|
|
|
}), |
|
|
|
new CompressionPlugin({ |
|
|
|
new CompressionPlugin({ |
|
|
|
asset: '[path].gz[query]', |
|
|
|
asset: '[path].gz[query]', |
|
|
|