Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): invalidate virtual files when changed
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 21, 2022
1 parent 4d80c43 commit 0543d9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 0543d9c

Please sign in to comment.