Skip to content

Commit

Permalink
chore: build uni-app-harmony
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangyaqi committed Jan 7, 2025
1 parent 243f27c commit 1b8ca2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/uni-app-harmony/dist/uni.compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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`;
}
}
});
Expand Down

0 comments on commit 1b8ca2c

Please sign in to comment.