Skip to content

Commit

Permalink
fix: support urls with query during dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Aug 16, 2022
1 parent 44953dc commit 35b7361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
Expand Down

0 comments on commit 35b7361

Please sign in to comment.