mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 12:05:24 -04:00
Signed-off-by: yangbo <1442420648@qq.com> Change-Id: Icb7c53ca27b6b17a79d9eea3254b7eef296bd353
This commit is contained in:
+3
-2
@@ -90,9 +90,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user