From 2f478ed6b6936767c4e74b5692fa67c4c7e07843 Mon Sep 17 00:00:00 2001 From: yoho <907415276@qq.com> Date: Thu, 5 May 2022 13:26:46 +0800 Subject: [PATCH] fix: client full reload (#8018) --- packages/vite/src/client/client.ts | 1 + 1 file changed, 1 insertion(+) 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()