提交 ed5e8548 编写于 作者: Q qiang

fix: 处理 locale 目录不存在时 webpack5 环境触发差量编译的问题

上级 39bd6ad6
......@@ -67,7 +67,11 @@ module.exports = function (content, map) {
)
// this.addDependency(pagesJsonJsPath)
this.addContextDependency(path.resolve(process.env.UNI_INPUT_DIR, 'locale'))
const localePath = path.resolve(process.env.UNI_INPUT_DIR, 'locale')
// 路径不存在时会触发 webpack5 差量编译
if (fs.existsSync(localePath)) {
this.addContextDependency(localePath)
}
this.addDependency(manifestJsonPath)
let pagesJson = parsePagesJson(content, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册