Skip to content

Commit e1623cf

Browse files
committed
fix(build): fix missing subPackages page info
1 parent 6e1a1ce commit e1623cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/mars-build/src/gulp-mars-h5.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ async function compile(file, opt) {
295295
});
296296
}
297297
let routes = [];
298-
pages.concat(subPages).forEach(page => {
298+
const allPages = pages.concat(subPages);
299+
allPages.forEach(page => {
299300
const name = `_${md5(page).substr(0, 8)}`;
300301
// const name = page.replace(/\//g, '$');
301302
content += `import ${name} from './${page}.vue';\n`;
@@ -311,7 +312,7 @@ async function compile(file, opt) {
311312

312313
let pageTitleMap = {};
313314
Object.keys(pagesInfo).forEach(key => {
314-
if (key !== 'app' && pages.indexOf(key) > -1) {
315+
if (key !== 'app' && allPages.indexOf(key) > -1) {
315316
pageTitleMap[`/${key}`] = Object.assign({}, appWin, pagesInfo[key]);
316317
pageTitleMap[`/${key}`].title = pageTitleMap[`/${key}`].navigationBarTitleText;
317318
}

0 commit comments

Comments
 (0)