Skip to content

Commit

Permalink
Prevent Svelte HMR warning during the build (#4057)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Jul 26, 2022
1 parent 44694d8 commit 4025111
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-phones-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': patch
---

Remove Svelte HMR warning during the build
5 changes: 5 additions & 0 deletions packages/integrations/svelte/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ function getViteConfiguration({
],
};

// Disable hot mode during the build
if(!isDev) {
defaultOptions.hot = false;
}

let resolvedOptions: Partial<Options>;

if (!options) {
Expand Down

0 comments on commit 4025111

Please sign in to comment.