Closed dominikg closed 1 week ago
Latest commit: b612177ccc8abc0e5d093ca1b5a771d0c891a964
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
I remember rixo saying that it's possible to check for that and fall back to the regular accepts if the environment doesn't support acceptExports? That way we can potentially support more than vite hmr
I remember rixo saying that it's possible to check for that and fall back to the regular accepts if the environment doesn't support acceptExports? That way we can potentially support more than vite hmr
added a conditional, new output looks like this
if (import.meta.hot) {
const s = $.source(App);
App = $.hmr(s);
if (import.meta.hot.acceptExports) import.meta.hot.acceptExports(["default"], (module) => {
$.set(s, module.default);
}); else import.meta.hot.accept((module) => {
$.set(s, module.default);
});
}
vite-plugin-svelte 4 is ready for its first prerelease: https://github.com/sveltejs/vite-plugin-svelte/pull/893
would be good if svelte 5 had this PR and https://github.com/sveltejs/svelte/pull/11456 landing soon so we can raise the minimum peer dep and users can enjoy inspector and hmr :rocket:
improvement for hmr with vite-plugin-svelte. This requires a new version of vps to work so both
Svelte 5 rewrite
Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint