mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
perf(vite-node): only invalidate cache for user code (#6156)
This commit is contained in:
parent
54da45e7a1
commit
f0485d83d9
@ -22,6 +22,11 @@ export default async (ssrContext) => {
|
||||
process.server = true
|
||||
render = render || (await runner.executeFile(viteNodeOptions.entryPath)).default
|
||||
const result = await render(ssrContext)
|
||||
runner.moduleCache.clear()
|
||||
// reset cache for non-node-modules
|
||||
for (const key of runner.moduleCache.keys()) {
|
||||
if (!key.includes('/node_modules/')) {
|
||||
runner.moduleCache.delete(key)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user