From 90036f33119a9365cf7cbe5a2af09964baee93c4 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 30 Apr 2020 12:37:01 +0800 Subject: [PATCH] fix(mp): windows --- packages/uni-cli-shared/lib/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uni-cli-shared/lib/util.js b/packages/uni-cli-shared/lib/util.js index 4882f24a90..ad0dc21820 100644 --- a/packages/uni-cli-shared/lib/util.js +++ b/packages/uni-cli-shared/lib/util.js @@ -91,7 +91,7 @@ function hasModule (name) { const NODE_MODULES_REGEX = /(\.\.\/)?node_modules/g function normalizeNodeModules (str) { - str = str.replace(NODE_MODULES_REGEX, 'node-modules') + str = normalizePath(str).replace(NODE_MODULES_REGEX, 'node-modules') if (process.env.UNI_PLATFORM === 'mp-alipay') { str = str.replace('node-modules/@', 'node-modules/npm-scope-') } -- GitLab