diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 420d084ef9a981..eef44c0b7c782a 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -106,6 +106,7 @@ async function handleMessage(payload: HMRPayload) { const payloadPath = base + payload.path.slice(1) if ( pagePath === payloadPath || + payload.path === '/index.html' || (pagePath.endsWith('/') && pagePath + 'index.html' === payloadPath) ) { location.reload()