From cc027b35677f99072f51158c1eabf21871b77776 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 21 Oct 2022 18:21:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E9=A1=B5=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E6=97=B6,=E8=AE=BF=E9=97=AE=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/dev.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) {