diff --git a/packages/vite/src/node/server/hmr.ts b/packages/vite/src/node/server/hmr.ts index 73e3c11ce468c4..2efe0276eed5d9 100644 --- a/packages/vite/src/node/server/hmr.ts +++ b/packages/vite/src/node/server/hmr.ts @@ -159,7 +159,7 @@ export function updateModules( path: boundary.url, explicitImportRequired: boundary.type === 'js' - ? isExplicitImportRequired(boundary.url) + ? isExplicitImportRequired(acceptedVia.url) : undefined, acceptedPath: acceptedVia.url }))