mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 12:05:24 -04:00
Fix some scenario of importing Lib's ohmUrl
Signed-off-by: hufeng <hufeng20@huawei.com> Change-Id: I2fcd6832a8b470b2cb11d9b8a16d655c7cead903
This commit is contained in:
@@ -884,7 +884,8 @@ function replaceOhmStartsWithBundle(url: string, item: string, importValue: stri
|
||||
if (urlResult) {
|
||||
const moduleKind: string = urlResult[3];
|
||||
if (moduleKind === 'lib') {
|
||||
item = replaceLibSo(importValue, moduleRequest, sourcePath);
|
||||
const libSoKey: string = urlResult[4];
|
||||
item = replaceLibSo(importValue, libSoKey, sourcePath);
|
||||
}
|
||||
}
|
||||
return item;
|
||||
@@ -898,7 +899,7 @@ function replaceOhmStartsWithModule(url: string, item: string, importValue: stri
|
||||
const modulePath: string = urlResult[3];
|
||||
const bundleName: string = getPackageInfo(projectConfig.aceModuleJsonPath)[0];
|
||||
moduleRequest = `@bundle:${bundleName}/${moduleName}/${moduleKind}/${modulePath}`;
|
||||
item = moduleKind === 'lib' ? replaceLibSo(importValue, moduleRequest, sourcePath) :
|
||||
item = moduleKind === 'lib' ? replaceLibSo(importValue, modulePath, sourcePath) :
|
||||
item.replace(/['"](\S+)['"]/, '\"' + moduleRequest + '\"');
|
||||
}
|
||||
return item;
|
||||
|
||||
Reference in New Issue
Block a user