sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
844 stars 103 forks source link

fix(hmr): compile files in /node_modules/ with hmr: false #949

Closed dominikg closed 2 months ago

dominikg commented 2 months ago

this saves some time and space, but also ensures consistency in cssHash which avoids bugs like https://github.com/sveltejs/svelte/issues/12601

Conduitry commented 2 months ago

Hm. Could someone conceivably have an npm linked dependency here that they still want HMR for?

dominikg commented 2 months ago

Hm. Could someone conceivably have an npm linked dependency here that they still want HMR for?

for that they would have to add the dep to optimizeDeps.exclude or it would be prebundled which prevents hmr too. but for comparability i'll post a different fix that updates cssHash instead.

dominikg commented 2 months ago

losing in favor of #950