Skip to content

Commit

Permalink
fix: avoid SSR HMR for HTML files (#19193)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Jan 14, 2025
1 parent 76082e3 commit 3bd55bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export async function handleHMRUpdate(
}
if (!options.modules.length) {
// html file cannot be hot updated
if (file.endsWith('.html')) {
if (file.endsWith('.html') && environment.name === 'client') {
environment.logger.info(
colors.green(`page reload `) + colors.dim(shortFile),
{
Expand Down

0 comments on commit 3bd55bc

Please sign in to comment.