GitBucket
4.6.0
//build.js 升级版 多进程 编译所有
//parallel-webpack允许您并行运行多个Webpack构建,从而将工作分散到各个处理器上,从而有助于显着加快构建速度
var run = require('parallel-webpack').run,
configPath = require.resolve('./webpack.config.js'),
options = {
watch: false,
maxRetries: 1,
stats: false, // defaults to false
maxConcurrentWorkers: 2 // use 2 workers
};
function notify() {
// do things
console.log('编译完成!')
}
run(configPath, options, notify);