From 3768a205a9de79e93387d34a9f30c35020c6d493 Mon Sep 17 00:00:00 2001 From: markthree <1801982702@qq.com> Date: Sun, 24 Dec 2023 22:50:05 +0800 Subject: [PATCH] fix: fix comment typo --- packages/shared/virtual-module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/virtual-module.ts b/packages/shared/virtual-module.ts index cc23811..cded948 100644 --- a/packages/shared/virtual-module.ts +++ b/packages/shared/virtual-module.ts @@ -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