-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(svelte5): enable hmr #836
Conversation
Just looking at this, we need to possibly avoid some other call-sites for Svelte 5:
|
the goal is that we have a new compile option for svelte5 like compileOptions.hmr, and don't use vitePlugin.hot at all anymore. It being forced to false leads to svelte-hmr being unused so we don't need all of the code for that anymore.. Which brings us to the next step that follows around rc release of svelte5, a new vite plugin svelte major that removes all of the code only required for svelte4, including removal of svelte-hmr as a dep. @rixo knows more about the history between divergences in snowpack, vite and nollup. potentially different apis would be webpack https://webpack.js.org/api/hot-module-replacement/ and turbopack ?! the question is if you want to deal with these on the compiler level or if you want the bundler plugin to give you an adapter like svelte-hmr did in createMakeHot? |
this early return needs to be changed in this PR before it actually works
|
Co-authored-by: Conduitry <[email protected]>
do we have to check a minimum svelte5 version to avoid it breaking for users on previous alphas? |
@dominikg If they are on previous alphas, |
enable support for the upcoming native hmr support in svelte5
cc @rixo