diff --git a/packages/uni-app-harmony/dist/uni.compiler.js b/packages/uni-app-harmony/dist/uni.compiler.js index f1405cd6d5..aa1a0a797e 100644 --- a/packages/uni-app-harmony/dist/uni.compiler.js +++ b/packages/uni-app-harmony/dist/uni.compiler.js @@ -85,6 +85,9 @@ function generateHarmonyImportSpecifier(id) { } }); } +function generateHarName(moduleName) { + return moduleName.replace(/@/g, '').replace(/\//g, '__').replace(/-/g, '_'); +} function generateHarmonyImportExternalCode(harmonyPackageNames) { return harmonyPackageNames .filter((harmonyPackageName) => isHarmonyGlobal(harmonyPackageName)) @@ -343,16 +346,13 @@ function initUniExtApi() { const depPath = './uni_modules/' + dep.plugin; dependencies[dep.moduleSpecifier] = depPath; modules.push({ - name: dep.moduleSpecifier - .replace(/@/g, '') - .replace(/\//g, '__') - .replace(/-/g, '_'), + name: generateHarName(dep.moduleSpecifier), srcPath: depPath, }); } else { if (!dependencies[dep.moduleSpecifier]) { - dependencies[dep.moduleSpecifier] = dep.version; + dependencies[dep.moduleSpecifier] = `./libs/${generateHarName(dep.moduleSpecifier)}.har`; } } });