diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 703fc3f7302f29..ef4d6ad78b9e50 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -190,7 +190,7 @@ async function handleMessage(payload: HMRPayload) { // module script failed to load (since one of the nested imports is 500). // in this case a normal update won't work and a full reload is needed. if (isFirstUpdate && hasErrorOverlay()) { - window.location.reload() + location.reload() return } else { if (enableOverlay) {