sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
817 stars 99 forks source link

fix: disable hmr when explicitly disabled in vite config #913

Closed dominikg closed 1 month ago

dominikg commented 1 month ago

improvement coming from discussion in #909

dominikg commented 1 month ago

one caveat is for testsuites that actually do test hmr behavior with vitest, you have to explicitly set compilerOptions.hmr = true.

these suites are almost guaranteed to be our own or those of other tooling devs very close to us. Users would almost never make custom hmr things that need testing this way.

dominikg commented 1 month ago

caveat mentioned previously no longer applies. vitest sets server.hmr to false so we don't have to do anything.