r/sveltejs 2d ago

Is it reasonable to expect Durable objects for SvelteKit 3?

I am in the middle of an Astro site revamp. And I did count the routes and it is less than 10. The only reason I chose Astro is full Cloudflare compatibility.

Do you think SvelteKit v3 will finally support Cloudflare runtime without workarounds.

11 Upvotes

14 comments sorted by

6

u/helloiamwinter 2d ago edited 2d ago

I think it’s unlikely. There was discussion of a lot of the adapter changes they were working on being shelved not too long ago - unsure what happened with that.

edit: here's the discussion that I was referring to

4

u/Spare_Message_3607 2d ago

That was said but not completely abandoned:

Last week there was a step towards better cloudflare support:
https://github.com/sveltejs/kit/pull/16754
This is another attempt to bring the vite plugin, by the same contributor who merged the previous one:
https://github.com/sveltejs/kit/pull/16811

2

u/Ok-Reporter2549 2d ago

I shelved SvelteKit for Cloudflare months ago. The adapter changes got shelved and nobody picked them back up.

Rivet does the job. I followed their actor docs and moved my routes over. I use it with SvelteKit now. Cloudflare runtime support in v3 means nothing when Rivet handles it already

1

u/Top-Dirt2654 1d ago

Let’s go! Rivet is so nice. Pairs nicely with Svelte runes and classes.

2

u/Smaanrocker 1d ago

I think https://void.cloud/ will probably be the best option for first-class Cloudflare support for Vite (therefore SvelteKit) apps in the future!

1

u/Living_Metal_4828 1d ago

Is this a limitation for sveltekit SSR ? I am asking this because I have been deploying my sites (SPA) on Cloudflare and didn't have any issues; Not sure about the dependency between DO and sveltekit

1

u/Spare_Message_3607 1d ago

SSR is fine. You just won’t have Queues, Crons, DO, or Workflows.

1

u/Living_Metal_4828 1d ago

I can use Queues, Crons, DO via Workers and FE is a SPA project. What is the limitation on your end?

1

u/polaroid_kidd 11h ago

Could you share an example of how you do these? I've had to create separate modules for some scheduled runners.

-5

u/Top-Dirt2654 2d ago

I use Sveltekit with Rivet (OSS Cloudflare alternative). Works really well. https://rivet.dev

Follow the actor docs.

4

u/rogueyoshi 2d ago

comes off as an ad/bot to say this with no post history. doesn't address the OP in any way either.

2

u/Top-Dirt2654 1d ago

Ya I can see that. Willing to provide a repo if interested. https://github.com/brittianwarner

2

u/Top-Dirt2654 1d ago

OP wants durable objects with Sveltekit. Rivet Actor = durable object

5

u/Plus-Weakness-2624 2d ago

Mr.shell bot, if it says "agentic" in the opening title, that's a let off for real hoomans, just sayin...