From a585086c8b7ce4907e5ebdec614033110f740c58 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 26 Jul 2022 21:13:40 +0800 Subject: [PATCH] fix(nuxt): clear `vite-node` runner cache after each render (#6154) --- packages/vite/src/runtime/vite-node.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vite/src/runtime/vite-node.mjs b/packages/vite/src/runtime/vite-node.mjs index dcf89ccc97..88b63e3fb2 100644 --- a/packages/vite/src/runtime/vite-node.mjs +++ b/packages/vite/src/runtime/vite-node.mjs @@ -22,5 +22,6 @@ export default async (ssrContext) => { process.server = true render = render || (await runner.executeFile(viteNodeOptions.entryPath)).default const result = await render(ssrContext) + runner.moduleCache.clear() return result }