From 9568fea8fc50e625c8ef27c588eca3dbe5a44e81 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Tue, 26 Dec 2023 16:17:31 +0530 Subject: [PATCH] fix(build): clear cache after build closes #3363 --- src/node/build/build.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node/build/build.ts b/src/node/build/build.ts index 1634b3580062..7dca478a67aa 100644 --- a/src/node/build/build.ts +++ b/src/node/build/build.ts @@ -8,6 +8,7 @@ import { rimraf } from 'rimraf' import { pathToFileURL } from 'url' import type { BuildOptions, Rollup } from 'vite' import { resolveConfig, type SiteConfig } from '../config' +import { clearCache } from '../markdownToVue' import { slash, type HeadConfig } from '../shared' import { deserializeFunctions, serializeFunctions } from '../utils/fnSerialize' import { task } from '../utils/task' @@ -140,6 +141,7 @@ export async function build( await generateSitemap(siteConfig) await siteConfig.buildEnd?.(siteConfig) + clearCache() siteConfig.logger.info( `build complete in ${((Date.now() - start) / 1000).toFixed(2)}s.`