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; if (!options) {