-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Support SvelteKit #600
Comments
@niiwade Would you like to create a PR for this? |
yes sure |
note that there is a community adapter here you can maybe crib from https://github.com/gornostay25/svelte-adapter-bun |
Thank you @sw-yx , am checking it out |
Status on SvelteKit:
|
SvelteKit is now working with |
Worker threads got it so importing sveltekit stopped throwing, which gets us past the vite config load step. But We're not fully there yet, unfortunately. I've spotted some reliability issues with actions and Looking into it and maybe we'll have it fully working by 0.7.3. |
update: found what is blocking sveltekit actions from working: const headers = new Headers();
headers.append("Content-Type", "application/json");
headers.append("Set-Cookie", "cookies");
const entries = Array.from(headers);
expect(entries).toEqual([
["content-type", "application/json"],
["set-cookie", "cookies"],
]); what bun is doing is duplicating the content-type header, meaning cookies never get set. this took a very long time to narrow down haha |
the set cookie pr will make dev server fully functional. there is a different issue that is tracked by #3943 but i htink we should keep this issue open until that is fixed as this a broader tracking issue. we are close. i imagine this week / next release |
did i say this week actually meant now after #4052 |
@paperdave are there special considerations for running SvelteKit with Bun like changing the adapter or some other tweak? Forms are still hanging on me. Looks related to websockets. I'm running all the latest packages and the latest canary build on WSL2. |
I'll admit I don't know exactly how the binaries are served. The README suggests canary is built on every push to |
@gitblit interesting, you might be right about that. In that case I wonder why the canary docker image isn't kept in sync. |
Canary is compiled on every commit to main. Here is the most recent one for Linux x64 at the time of writing: https://github.com/oven-sh/bun/actions/runs/5794742061 The |
The 0.8.0 canary is now running my SvelteKit app almost perfectly. The fix for hanging await formData mentioned on Twitter addresses the scenario I noted here. I will post the remaining issue I observe as a new ticket. |
There is something going on here - sveltekit often freezes and doesn't manage to boot the server. |
For the development of bun run dev, I prefer to use a plugin like vite directly on vs code store because there is a bug |
To build for production, you'll need to add the right SvelteKit adapter. Currently we recommend the bun add -D svelte-adapter-bun. Now, make the following changes to your svelte.config.js. |
Let's see what the svelte summit tomorrow brings of announcements. |
What is the problem this feature will solve?
We need to have Svelte to be included in the project creation step to make it easy to using Bun to create Sveltekit apps.
What is the feature you are proposing to solve the problem?
We need
bun create svelte ./app
to make it easy to create a new svelte projectWhat alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: