refactor(build): reuse pageData.relativePath for the HMR payload path

Equivalent to re-applying the rewrite map manually, but hardened
against drive-letter case mismatches on Windows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5014/head
Divyansh Singh 1 month ago
parent fdd68e37a7
commit 7ee811b7e6

@ -242,7 +242,7 @@ export async function createVitePressPlugin(
) { ) {
logDeadLinks(deadLinks, siteConfig.logger, true) logDeadLinks(deadLinks, siteConfig.logger, true)
const payload: PageDataPayload = { const payload: PageDataPayload = {
path: `/${siteConfig.rewrites.map[relativePath] || relativePath}`, path: `/${pageData.relativePath}`,
pageData pageData
} }
// notify the client to update page data // notify the client to update page data

Loading…
Cancel
Save