mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
fix: disable HMR during build (#2684)
This commit is contained in:
parent
4eb80773a7
commit
c7bbb11289
2 changed files with 6 additions and 0 deletions
5
.changeset/wet-knives-raise.md
Normal file
5
.changeset/wet-knives-raise.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix issue where HMR could be triggered during `astro build`
|
|
@ -204,6 +204,7 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handleHotUpdate(context) {
|
async handleHotUpdate(context) {
|
||||||
|
if (context.server.config.isProduction) return;
|
||||||
return handleHotUpdate(context, config, logging);
|
return handleHotUpdate(context, config, logging);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue