kit
kit copied to clipboard
Vite 6
Experimental. WIP
🦋 Changeset detected
Latest commit: d704a1c547ed5ed6c1a3f9e628d7077a7ae4de48
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 5 packages
| Name | Type |
|---|---|
| @sveltejs/adapter-cloudflare-workers | Minor |
| @sveltejs/adapter-cloudflare | Minor |
| @sveltejs/adapter-netlify | Minor |
| @sveltejs/adapter-vercel | Minor |
| @sveltejs/kit | Minor |
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 think there's a few errors here, but the biggest seems to be that Vite 6 is treating all .json files as being a tsconfig.json and then reloading the server when such a file changes. @dominikg had a PR out for this here: https://github.com/vitejs/vite/pull/17317
The changes to the esbuild plugin have been reverted so the prior issue with tsconfck is gone. We're down to two errors now:
[chromium-dev] › client.test.js:448:2 › Invalidation › server-only load functions are re-run following forced invalidation
[chromium-dev] › client.test.js:461:2 › Invalidation › server-only load functions are re-run following goto with forced invalidation
This can be reproduced locally by running playwright on just that one test (just need to do pnpm install beforehand):
packages/kit/test/apps/basics$ pnpm test:dev -g "server-only load functions are re-run following forced invalidation"
This is the line that's failing while running this route:
https://github.com/sveltejs/kit/blob/6056ba30e29ac5747c356fbf1a42dd71f2c4aa1f/packages/kit/test/apps/basics/test/client.test.js#L450
It seems that Vite is loading the same module twice: once by the +layout.server module, then again by the +page.server module. However, it should only be loaded once by +layout.server then re-used by +page.server so that they are both incrementing the same count variable.
You can test this by adding a console.log(count) statement at the top level, spin up a dev server, and see it log twice when you access the page for the first time.
https://github.com/sveltejs/kit/blob/main/packages/kit/test/apps/basics/src/routes/load/invalidation/forced/state.js
SvelteKit is now green in vite-ecosystem-ci. Upgrading to [email protected] should work out the issues in this PR.
preview: https://svelte-dev-git-preview-kit-12270-svelte.vercel.app/
this is an automated message
Hi, when will this pull request be merged?