From 8266b3c3a28bc051525d53c92263a67f622db9ce Mon Sep 17 00:00:00 2001 From: yangbo <1442420648@qq.com> Date: Sun, 13 Mar 2022 16:44:42 +0800 Subject: [PATCH] fixed e076896 from https://gitee.com/txdyyangbo/developtools_ace-js2bundle/pulls/178 yangbo198@huawei.com Signed-off-by: yangbo <1442420648@qq.com> Change-Id: I5fd2a5c00047c0b1159ff6152d3c08e1c19735f0 --- ace-loader/src/resource-plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ace-loader/src/resource-plugin.js b/ace-loader/src/resource-plugin.js index da424ee..de513ec 100644 --- a/ace-loader/src/resource-plugin.js +++ b/ace-loader/src/resource-plugin.js @@ -156,7 +156,7 @@ function addPageEntryObj() { throw Error('ERROR: missing pages').message; } pages.forEach((element) => { - const sourcePath = element; + const sourcePath = element.replace(/^\.\/js\//, ''); const hmlPath = path.join(input, sourcePath + '.hml'); const aceSuperVisualPath = process.env.aceSuperVisualPath || ''; const visualPath = path.join(aceSuperVisualPath, sourcePath + '.visual'); @@ -166,9 +166,9 @@ function addPageEntryObj() { if (isHml && isVisual) { console.error('ERROR: ' + sourcePath + ' cannot both have hml && visual'); } else if (isHml) { - entryObj['./' + element] = path.resolve(projectPath, './' + sourcePath + '.hml?entry'); + entryObj['./' + sourcePath] = path.resolve(projectPath, './' + sourcePath + '.hml?entry'); } else if (isVisual) { - entryObj['./' + element] = path.resolve(aceSuperVisualPath, './' + sourcePath + + entryObj['./' + sourcePath] = path.resolve(aceSuperVisualPath, './' + sourcePath + '.visual?entry'); } }); -- Gitee