From b90a61fc7634dadf31e92323935203d0ceccf5b8 Mon Sep 17 00:00:00 2001 From: yangbo <1442420648@qq.com> Date: Sun, 13 Mar 2022 16:44:42 +0800 Subject: [PATCH] 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 f855db6..346c027 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'); } });