fix(nuxt): clear vite-node runner cache after each render (#6154)

This commit is contained in:
Anthony Fu 2022-07-26 21:13:40 +08:00 committed by GitHub
parent 25ac652652
commit a585086c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,5 +22,6 @@ export default async (ssrContext) => {
process.server = true process.server = true
render = render || (await runner.executeFile(viteNodeOptions.entryPath)).default render = render || (await runner.executeFile(viteNodeOptions.entryPath)).default
const result = await render(ssrContext) const result = await render(ssrContext)
runner.moduleCache.clear()
return result return result
} }