fix: snippet hmr not working with rewrites

pull/3008/head
Divyansh Singh 1 year ago
parent c231c13b2e
commit a2750492be

@ -70,7 +70,7 @@ export async function createMarkdownToVueRenderFn(
siteConfig?.rewrites.map[file.slice(srcDir.length + 1)] siteConfig?.rewrites.map[file.slice(srcDir.length + 1)]
file = alias ? path.join(srcDir, alias) : file file = alias ? path.join(srcDir, alias) : file
const relativePath = slash(path.relative(srcDir, file)) const relativePath = slash(path.relative(srcDir, file))
const cacheKey = JSON.stringify({ src, file }) const cacheKey = JSON.stringify({ src, file: fileOrig })
if (isBuild || options.cache !== false) { if (isBuild || options.cache !== false) {
const cached = cache.get(cacheKey) const cached = cache.get(cacheKey)

Loading…
Cancel
Save