2016-08-12 65 views

回答

0

首先安裝該插件與故宮。

npm install --save-dev webpack-parallel-uglify-plugin 

然後替換您當前在webpack.config.js文件中使用的uglify插件。

const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); 
const parallelUglifyPlugin = new ParallelUglifyPlugin({}); 

module.exports = { 
    plugins: [ 
    commonsPlugin, 
    dedupePlugin, 
    parallelUglifyPlugin, // <-- new plugin 
    fnCaseSensitivityPlugin, 
    sourceMapPlugin, 
    fnDonePlugin 
    ] 
};