优化单页应用时,访问地址增加默认配置

pull/1/head
yutent 2022-10-21 18:21:37 +08:00
parent e9a9cadd3b
commit cc027b3567
1 changed files with 8 additions and 1 deletions

View File

@ -62,7 +62,14 @@ export default function createServer(root = '', conf = {}) {
}
pathname = pathname.join('/')
} else {
isIndex = true
if (IS_MPA) {
isIndex = true
} else {
pageName = Object.keys(conf.pages).pop()
currentPage = pageName
pagesDir = dirname(conf.pages[pageName].entry)
ext = 'html'
}
}
for (let k in COMMON_HEADERS) {