Skip to content

Commit

Permalink
fix: fix comment typo
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Dec 24, 2023
1 parent eab6610 commit 3768a20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/virtual-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function createVirtualModuleLoader(ctx: { utils: WindiPluginUtils; inHmr?
},

async watchChange(id, change) {
// In vite5, `watchChange` is triggered before hmr even if it's started, which can cause hot updates to fail,Add `inHmr` flag to skip duplicate triggers (isomorphic to vite4)
// In vite5, watchChange is triggered before hmr even if the devServer is started, which causes the hot update to fail, add the inHmr flag to skip the repeat trigger (as in vite4)
if (ctx.inHmr)
return

Expand Down

0 comments on commit 3768a20

Please sign in to comment.