Skip to content

Commit 4025111

Browse files
authored
Prevent Svelte HMR warning during the build (withastro#4057)
1 parent 44694d8 commit 4025111

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/lucky-phones-mix.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/svelte': patch
3+
---
4+
5+
Remove Svelte HMR warning during the build

packages/integrations/svelte/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ function getViteConfiguration({
3838
],
3939
};
4040

41+
// Disable hot mode during the build
42+
if(!isDev) {
43+
defaultOptions.hot = false;
44+
}
45+
4146
let resolvedOptions: Partial<Options>;
4247

4348
if (!options) {

0 commit comments

Comments
 (0)