diff --git a/.changeset/wet-drinks-call.md b/.changeset/wet-drinks-call.md new file mode 100644 index 000000000..8b88506d7 --- /dev/null +++ b/.changeset/wet-drinks-call.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/vite-plugin-svelte': patch +--- + +Update log level for HMR updates where the output is functionally equivalent to the previous version to "debug" diff --git a/packages/vite-plugin-svelte/src/handle-hot-update.js b/packages/vite-plugin-svelte/src/handle-hot-update.js index 46b9cf1cc..f54fc4321 100644 --- a/packages/vite-plugin-svelte/src/handle-hot-update.js +++ b/packages/vite-plugin-svelte/src/handle-hot-update.js @@ -104,8 +104,10 @@ function jsChanged(prev, next, filename) { } const isLooseEqual = isCodeEqual(normalizeJsCode(prevJs), normalizeJsCode(nextJs)); if (!isStrictEqual && isLooseEqual) { - log.warn( - `ignoring compiler output js change for ${filename} as it is equal to previous output after normalization` + log.debug( + `ignoring compiler output js change for ${filename} as it is equal to previous output after normalization`, + undefined, + 'hmr' ); } return !isLooseEqual;