Skip to content

Commit

Permalink
Lowers log level to debug (#806)
Browse files Browse the repository at this point in the history
* Lowers log level to debug

This message isn't immediately actionable for developers and can reasonably be considered debugging output. Therefore, the log level has been updated to reflect this.

* Adds a debug section

This commit adds a debug section for "hmr" to the line, as suggested by @dominikg.

Co-authored-by: Dominik G. <[email protected]>

* Adds changeset

---------

Co-authored-by: Dominik G. <[email protected]>
  • Loading branch information
Radiergummi and dominikg authored Nov 20, 2023
1 parent 158a6d5 commit f2dfba3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-drinks-call.md
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 4 additions & 2 deletions packages/vite-plugin-svelte/src/handle-hot-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f2dfba3

Please sign in to comment.