mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(vite): invalidate virtual files when changed (#6038)
This commit is contained in:
parent
4d80c43d25
commit
45b449ed05
@ -97,7 +97,7 @@ export async function bundle (nuxt: Nuxt) {
|
||||
// Invalidate virtual modules when templates are re-generated
|
||||
ctx.nuxt.hook('app:templatesGenerated', () => {
|
||||
for (const [id, mod] of server.moduleGraph.idToModuleMap) {
|
||||
if (id.startsWith('\x00virtual:')) {
|
||||
if (id.startsWith('virtual:')) {
|
||||
server.moduleGraph.invalidateModule(mod)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user