提交 9022f221 编写于 作者: Y yurj26

fix: cli项目`@vue/compiler-core`环境不对的问题

上级 930f4bac
......@@ -19,4 +19,11 @@ if (debugIndex > 0) {
}
}
}
// uni-cli-shared 引入了 @vue/compiler-core,需要提前设置NODE_ENV,才能保证 @vue/compiler-core 加载的是对应环境的代码
if (
process.argv[2] === 'build' &&
!['-w', '--watch'].includes(process.argv[3])
) {
process.env.NODE_ENV = 'production'
}
require('../dist/cli/index.js')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册