diff --git a/lib/dev.js b/lib/dev.js index 616337b..8996e86 100644 --- a/lib/dev.js +++ b/lib/dev.js @@ -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) {