Skip to content

Commit

Permalink
fix(cli): windows下配置 weapp.compile.exclude 为 npm 包时路径问题 (NervJS#5227)
Browse files Browse the repository at this point in the history
  • Loading branch information
deng-yc authored and jiangzm committed Dec 7, 2020
1 parent f05be2f commit 4e0274d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-cli/src/util/resolve_npm_files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ async function recursiveRequire ({
const npmExclude = (compileConfig.exclude || []).filter(item => /(?:\/|^)node_modules(\/|$)/.test(item))
let isNpmInCompileExclude = false
for (const item of npmExclude) {
isNpmInCompileExclude = filePath.indexOf(item) !== -1
isNpmInCompileExclude = filePath.replace(/\\/g, '/').indexOf(item) !== -1
if (isNpmInCompileExclude) {
break
}
Expand Down

0 comments on commit 4e0274d

Please sign in to comment.