diff --git a/src/node/plugin.ts b/src/node/plugin.ts index efa8f1e66671..578a7b217e5f 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -162,10 +162,9 @@ export function createVitePressPlugin( // serve our index.html after vite history fallback return () => { server.middlewares.use((req, res, next) => { - if (req.url!.endsWith('.html')) { - res.statusCode = 200 - res.setHeader('Content-Type', 'text/html') - res.end(` + res.statusCode = 200 + res.setHeader('Content-Type', 'text/html') + res.end(`
@@ -179,9 +178,6 @@ export function createVitePressPlugin( `) - return - } - next() }) } },