mirror of https://github.com/status-im/codimd.git
Update webpack config to use parallel uglify plugin to speed up production build
This commit is contained in:
parent
5ce5d4cd84
commit
15bf2b6da8
|
@ -163,6 +163,7 @@
|
||||||
"script-loader": "^0.7.0",
|
"script-loader": "^0.7.0",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
"url-loader": "^0.5.7",
|
"url-loader": "^0.5.7",
|
||||||
"webpack": "^1.14.0"
|
"webpack": "^1.14.0",
|
||||||
|
"webpack-parallel-uglify-plugin": "^0.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ var webpack = require('webpack');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||||
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
|
var ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin');
|
||||||
|
|
||||||
module.exports = [Object.assign({}, baseConfig, {
|
module.exports = [Object.assign({}, baseConfig, {
|
||||||
plugins: baseConfig.plugins.concat([
|
plugins: baseConfig.plugins.concat([
|
||||||
|
@ -11,12 +12,14 @@ module.exports = [Object.assign({}, baseConfig, {
|
||||||
'NODE_ENV': JSON.stringify('production')
|
'NODE_ENV': JSON.stringify('production')
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new ParallelUglifyPlugin({
|
||||||
|
uglifyJS: {
|
||||||
compress: {
|
compress: {
|
||||||
warnings: false
|
warnings: false
|
||||||
},
|
},
|
||||||
mangle: false,
|
mangle: false,
|
||||||
sourceMap: false
|
sourceMap: false
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
new ExtractTextPlugin("[name].[hash].css")
|
new ExtractTextPlugin("[name].[hash].css")
|
||||||
]),
|
]),
|
||||||
|
|
Loading…
Reference in New Issue