From 615aed5df700ad98f82a74fbc785d290d1c5a018 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:38:04 +0530 Subject: [PATCH] fix(regression): hmr not working with markdown includes due to wrong cache key closes #4289 closes #4303 --- src/node/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/plugin.ts b/src/node/plugin.ts index 7aa0a9ade5f8..248c21f15388 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -431,7 +431,7 @@ export async function createVitePressPlugin( return [ ...modules, ...importers.map((id) => { - clearCache(id) + clearCache(slash(path.relative(srcDir, id))) return server.moduleGraph.getModuleById(id) }) ].filter(Boolean) as ModuleNode[]