Skip to content

Commit

Permalink
fix: avoid SSR HMR for HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jan 13, 2025
1 parent 76082e3 commit aa4ff71
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 aa4ff71

Please sign in to comment.