Skip to content

Commit

Permalink
fix(build): hmr with rewrites when base is set
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jan 29, 2023
1 parent 7f478d4 commit a05956f
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 @@ -194,7 +194,7 @@ export async function createVitePressPlugin(

server.middlewares.use((req, res, next) => {
if (req.url) {
const page = req.url.replace(/[?#].*$/, '').slice(1)
const page = req.url.replace(/[?#].*$/, '').slice(site.base.length)
req.url = req.url.replace(page, rewrites.inv[page] || page)
}
next()
Expand Down

0 comments on commit a05956f

Please sign in to comment.