提交 8f06a666 编写于 作者: fxy060608's avatar fxy060608

fix(mp): built-in component path

上级 be24f1c9
......@@ -133,7 +133,10 @@ const NODE_MODULES_REGEX = /(\.\.\/)?node_modules/g
export function normalizeNodeModules(str: string) {
str = normalizePath(str).replace(NODE_MODULES_REGEX, 'node-modules')
// HBuilderX 内置模块路径转换
str = str.replace(/.*\/plugins\/uniapp-cli\/node[-_]modules/, 'node-modules')
str = str.replace(
/.*\/plugins\/uniapp-cli-vite\/node[-_]modules/,
'node-modules'
)
if (process.env.UNI_PLATFORM === 'mp-alipay') {
str = str.replace('node-modules/@', 'node-modules/npm-scope-')
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册