From 2277b3e7c2d74dff80bb64b38a5fc85534c8fa5d Mon Sep 17 00:00:00 2001 From: yangbo <1442420648@qq.com> Date: Sun, 13 Mar 2022 16:51:12 +0800 Subject: [PATCH] fixed 4c2fb42 from https://gitee.com/txdyyangbo/developtools_ace-ets2bundle/pulls/337 yangbo198@huawei.com Signed-off-by: yangbo <1442420648@qq.com> Change-Id: Icb7c53ca27b6b17a79d9eea3254b7eef296bd353 --- compiler/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/main.js b/compiler/main.js index 84829165d..dc1657919 100644 --- a/compiler/main.js +++ b/compiler/main.js @@ -87,9 +87,10 @@ function loadEntryObj(projectConfig) { if (manifest.pages) { const pages = manifest.pages; pages.forEach((element) => { - const fileName = projectConfig.projectPath + path.sep + element + '.ets'; + const sourcePath = element.replace(/^\.\/ets\//, ''); + const fileName = projectConfig.projectPath + path.sep + sourcePath + '.ets'; if (fs.existsSync(fileName)) { - projectConfig.entryObj['./' + element] = fileName + '?entry'; + projectConfig.entryObj['./' + sourcePath] = fileName + '?entry'; } else { throw Error(`\u001b[31m ERROR: page '${fileName}' does not exist. \u001b[39m`).message; } -- Gitee