From d7c7412b6c5138a037978e2d80dac3708f5ce84e Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Thu, 9 Feb 2023 18:29:36 +0000 Subject: [PATCH] local: fix custom index --- src/lib/local/fulfill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/local/fulfill.js b/src/lib/local/fulfill.js index 789a77e..f8ae5c1 100644 --- a/src/lib/local/fulfill.js +++ b/src/lib/local/fulfill.js @@ -14,7 +14,7 @@ export default (givenPath, csp) => { if (!csp) csp = undefined; const basePath = extname(givenPath) ? dirname(givenPath) : givenPath; - const indexFile = extname(basePath) ? basename(basePath) : 'index.html'; + const indexFile = extname(givenPath) ? basename(givenPath) : 'index.html'; return async url => { url = new URL(url);