From 82d1fc31a65c9d40a6258bbde343b3160295e5cd Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 16 Mar 2023 19:55:00 +0800 Subject: [PATCH] fixed bug --- lib/dev.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dev.js b/lib/dev.js index 3e570f5..1f228cc 100644 --- a/lib/dev.js +++ b/lib/dev.js @@ -207,6 +207,9 @@ export default async function createServer(root = '', conf = {}) { } else { file = join(pagesDir, pathname) } + if (!fs.isfile(file)) { + file = join(SOURCE_DIR, pathname) + } } else { file = join(SOURCE_DIR, pathname) } diff --git a/package.json b/package.json index 859a9fc..6ffad3d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fite", "type": "module", - "version": "0.3.4", + "version": "0.3.5", "bin": { "fite": "index.js" },