Document how to use `adapter-cloudflare`...
https://github.com/sveltejs/kit/issues/2966 I've been reading through this and wondered if there was a solution yet? As I'm working on a SvelteKit pages project, that's using SSR (using a service binding) and naturally
platform.env
is undefined in dev... which makes local testing really difficult. Does anyone have a good solution (there are some in the issue but they are all quite hacky)GitHub
Document how to use
adapter-cloudflare
with svelte-kit dev
· Is...Describe the problem I can't figure out how to use svelte-kit dev and https://github.com/cloudflare/wrangler2 together while developing locally. This is necessary for sites that utilize Cloudfl...
2 Replies
GitHub
Platform context fallbacks · Issue #4292 · sveltejs/kit
Describe the problem When developing with svelte-kit dev, the event.platform object is always empty, with no great way to mock it. When building using an adapter like Cloudflare Workers, event.plat...
Thanks for this, pretty cool - it doesn't cover service bindings though 😅 I think those are perhaps a little easier though, as you could just call them over HTTP locally using fetch, and use the real binding from platform in production, and wrap that logic in a helper function... not ideal but perhaps doable