diff --git a/lib/mp-compiler/util.js b/lib/mp-compiler/util.js index 80686d0..eec581f 100644 --- a/lib/mp-compiler/util.js +++ b/lib/mp-compiler/util.js @@ -16,7 +16,9 @@ function getFileInfo (resourcePath) { var hash = require('hash-sum') const cache = Object.create(null) function getCompNameAndSrc (context, file) { - const filePath = `/${resolveSrc(context, file)}.wxml` + let filePath = `/${resolveSrc(context, file)}.wxml` + // 支持monorepo + filePath = filePath.replace('/..', '') if (!cache[file]) { cache[file] = hash(file) }