Upgrade Webpacker to version 2.0 (#3729)
This commit is contained in:
committed by
Eugen Rochko
parent
94d0e012de
commit
53e42bf91e
@ -7,26 +7,27 @@ const sharedConfig = require('./shared.js');
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
module.exports = merge(sharedConfig, {
|
||||
|
||||
devtool: 'source-map', // separate sourcemap file, suitable for production
|
||||
|
||||
output: { filename: '[name]-[chunkhash].js' },
|
||||
devtool: 'source-map', // separate sourcemap file, suitable for production
|
||||
stats: 'normal',
|
||||
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: true,
|
||||
sourceMap: true,
|
||||
mangle: true,
|
||||
|
||||
compress: {
|
||||
warnings: false,
|
||||
},
|
||||
|
||||
output: {
|
||||
comments: false,
|
||||
},
|
||||
|
||||
sourceMap: true,
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
asset: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: /\.(js|css|svg|eot|ttf|woff|woff2)$/,
|
||||
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf)$/,
|
||||
}),
|
||||
new BundleAnalyzerPlugin({ // generates report.html and stats.json
|
||||
analyzerMode: 'static',
|
||||
|
Reference in New Issue
Block a user