Skip to content

Commit 3bd55bc

Browse files
authored
fix: avoid SSR HMR for HTML files (#19193)
1 parent 76082e3 commit 3bd55bc

File tree

1 file changed

+1
-1
lines changed
  • packages/vite/src/node/server

1 file changed

+1
-1
lines changed

packages/vite/src/node/server/hmr.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ export async function handleHMRUpdate(
579579
}
580580
if (!options.modules.length) {
581581
// html file cannot be hot updated
582-
if (file.endsWith('.html')) {
582+
if (file.endsWith('.html') && environment.name === 'client') {
583583
environment.logger.info(
584584
colors.green(`page reload `) + colors.dim(shortFile),
585585
{

0 commit comments

Comments
 (0)