summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/lucky-phones-mix.md5
-rw-r--r--packages/integrations/svelte/src/index.ts5
2 files changed, 10 insertions, 0 deletions
diff --git a/.changeset/lucky-phones-mix.md b/.changeset/lucky-phones-mix.md
new file mode 100644
index 000000000..9c8f18e2d
--- /dev/null
+++ b/.changeset/lucky-phones-mix.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/svelte': patch
+---
+
+Remove Svelte HMR warning during the build
diff --git a/packages/integrations/svelte/src/index.ts b/packages/integrations/svelte/src/index.ts
index 3aa27e47e..367eeb1ed 100644
--- a/packages/integrations/svelte/src/index.ts
+++ b/packages/integrations/svelte/src/index.ts
@@ -38,6 +38,11 @@ function getViteConfiguration({
],
};
+ // Disable hot mode during the build
+ if(!isDev) {
+ defaultOptions.hot = false;
+ }
+
let resolvedOptions: Partial<Options>;
if (!options) {