08335 / hivui-platform-template
hivui平台项目模板
Newer
Older
hivui-platform-template / build / run.js
caibinghong on 13 Jul 2021 add
//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);