From 0ab247de5ba2f331827681ee45031d0c44172b75 Mon Sep 17 00:00:00 2001 From: hufeng Date: Mon, 5 Sep 2022 20:32:09 +0800 Subject: [PATCH] Remove bundleName & moduleName for ark's record Signed-off-by: hufeng Change-Id: I4c1100295f88e28bd6cb5e19c375334c7b3adf52 --- compiler/src/resolve_ohm_url.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/src/resolve_ohm_url.ts b/compiler/src/resolve_ohm_url.ts index 463a6f2..7951602 100644 --- a/compiler/src/resolve_ohm_url.ts +++ b/compiler/src/resolve_ohm_url.ts @@ -95,7 +95,6 @@ export function getOhmUrlByFilepath(filePath: string): string { const REG_PROJECT_SRC: RegExp = /(\S+)\/src\/(?:main|ohosTest)\/(ets|js)\/(\S+)/; const packageInfo: string[] = getPackageInfo(projectConfig.aceModuleJsonPath); - const bundleName: string = packageInfo[0]; const moduleName: string = packageInfo[1]; const moduleRootPath: string = toUnixPath(projectConfig.modulePathMap[moduleName]); const projectRootPath: string = toUnixPath(projectConfig.projectRootPath); @@ -106,7 +105,7 @@ export function getOhmUrlByFilepath(filePath: string): string { const result: RegExpMatchArray | null = projectFilePath.match(REG_PROJECT_SRC); if (result && result[1].indexOf(NODE_MODULES) === -1) { - return `${bundleName}/${moduleName}/${result[2]}/${result[3]}`; + return `${result[2]}/${result[3]}`; } if (projectFilePath.indexOf(NODE_MODULES) !== -1) {