...
|
...
|
@@ -2,6 +2,8 @@ const webpack = require('webpack'); |
|
|
var path = require('path');
|
|
|
let utils = require('./utils');
|
|
|
let config = require('./config')
|
|
|
const os = require('os');
|
|
|
const UglifyJsparallelPlugin = require('webpack-uglify-parallel');
|
|
|
const AssetsPlugin = require('assets-webpack-plugin');
|
|
|
let ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
|
...
|
...
|
@@ -62,10 +64,13 @@ module.exports = { |
|
|
new webpack.DefinePlugin({
|
|
|
'process.env': config.build.env
|
|
|
}),
|
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
|
new UglifyJsparallelPlugin({
|
|
|
workers: os.cpus().length,
|
|
|
mangle: true,
|
|
|
compress: {
|
|
|
warnings: false
|
|
|
},
|
|
|
comments: false,
|
|
|
sourceMap: true
|
|
|
}),
|
|
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
...
|
...
|
|