diff --git a/src/node/plugin.ts b/src/node/plugin.ts index 4711df99..d4602560 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -413,7 +413,8 @@ export async function createVitePressPlugin( } importerMap[slash(file)]?.forEach((relativePath) => { - clearCache(relativePath) + // the compile cache is keyed by the rewritten path + clearCache(siteConfig.rewrites.map[relativePath] || relativePath) const mod = this.environment.moduleGraph.getModuleById( path.posix.join(srcDir, relativePath) )