diff --git a/src/node/markdownToVue.ts b/src/node/markdownToVue.ts index eeb567a3..bc82adb5 100644 --- a/src/node/markdownToVue.ts +++ b/src/node/markdownToVue.ts @@ -43,8 +43,9 @@ export async function createMarkdownToVueRenderFn( ): Promise => { const relativePath = slash(path.relative(srcDir, file)) const dir = path.dirname(file) + const cacheKey = JSON.stringify({ src, file }) - const cached = cache.get(src) + const cached = cache.get(cacheKey) if (cached) { debug(`[cache hit] ${relativePath}`) return cached @@ -148,7 +149,7 @@ export async function createMarkdownToVueRenderFn( deadLinks, includes } - cache.set(src, result) + cache.set(cacheKey, result) return result } }