问题
const compiler1 = webpack(config)
const compiler2 = webpack(config2)
const build = async () => {
await compiler1.run()
console.log('continue...')
await compiler2.run()
}
# 预期
compiler1.run()执行
compiler1.run()执行完成
输出 continue...
compiler2.run()执行
...
# 实际
输出 continue...
compiler1.run()执行
compiler1.run()完成
compiler2.run()执行
...
怎么可以得到我的预期结果,通过async await
方式
需要进行包装.