diff --git a/src/node/plugin.ts b/src/node/plugin.ts index 3dfe0df4..fcef9f7d 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -170,7 +170,7 @@ export async function createVitePressPlugin( // serve our index.html after vite history fallback return () => { server.middlewares.use((req, res, next) => { - if (req.url!.endsWith('.html')) { + if (req.url!.replace(/\?.*$/, '').endsWith('.html')) { res.statusCode = 200 res.setHeader('Content-Type', 'text/html') res.end(`