You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to handle bindings when running sveltekit in dev mode
Content Location
The documentation does not describe how to handle bindings when running sveltekit application in dev mode.
Doing this post build is not a great development experience.
Hi @gerhardcit thanks a bunch for the issue 🙂, I'm very sorry for the late reply 🙇
Anyways it is currently not possible to access bindings in dev mode as clearly indicated by the SvelteKit docs (both for Workers and Pages).
The only possible solution here is to run wrangler pages dev .svelte-kit/cloudflare (you can also open a separate terminal and run vite build to update your app).
We know that this is not ideal and we are currently working on improving the situation (Pages is facing this issue with different frameworks, in which the Platform/Context object is only populated for production builds, we are working on a path forward for all of them).
We've actually noticed your approach in elithrar/svelte-demo-d1#3 and do think that it has potential 🤩 , we'll actually keep it in mind and could potentially suggest something along those lines if we can't find a more proper solution 🙂 (something like that seems like the only possible solution for now, unless the Svelte team will be able to provide some APIs which could allow us to do things more properly, of course if you have idea please let us know).
I think it is too early do document anything at this point as we're still working through all of this and trying to find the best solutions we can provide for our users.
We'll make sure to document everything (for SvelteKit as well for all the other frameworks) as soon as we can 🙂
In the meantime I'll leave it up to @deadlypants1973 whether we should close this issue or keep it open until we've implemented something and are ready to documented things (we're working on it but we don't and an ETA yet) 🙂
Which Cloudflare product(s) does this pertain to?
Workers
Subject Matter
How to handle bindings when running sveltekit in dev mode
Content Location
The documentation does not describe how to handle bindings when running sveltekit application in dev mode.
Doing this post build is not a great development experience.
See elithrar/svelte-demo-d1#1
Additional information
No response
The text was updated successfully, but these errors were encountered: