Skip to content

Commit

Permalink
fix: disable HMR during build (#2684)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Mar 1, 2022
1 parent 4eb8077 commit c7bbb11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-knives-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix issue where HMR could be triggered during `astro build`
1 change: 1 addition & 0 deletions packages/astro/src/vite-plugin-astro/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu
}
},
async handleHotUpdate(context) {
if (context.server.config.isProduction) return;
return handleHotUpdate(context, config, logging);
},
};
Expand Down

0 comments on commit c7bbb11

Please sign in to comment.