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
At the moment, SvelteKit does not appear to support using actual bindings when using adapter-cloudflare(not sure about adapter-cloudflare-workers). This resulted in projects like cf-bindings-proxy, which give you a function that, when platform.env is not detected, will fetch a separate Worker that served as a proxy for the requested bindings.
Describe the proposed solution
Miniflare recently re-added support for get*() methods, which allows you to get bindings directly. This can then be used in conjunction with adapter.emulate() to pass bindings, cache, req.cf info, and the ctx object, allowing SvelteKit local dev to come closer to how it functions when deployed.
Alternatives considered
This could also be remedied by running the entire SvelteKit dev server within workerd/wrangler, but support for that from both the Cloudflare and SvelteKit team seems a way off.
Importance
would make my life easier
Additional Information
Accidentally made #11786 after pushing to my fork, I'll leave it up as an example/able to push it if y'all think it is a good idea.
The text was updated successfully, but these errors were encountered:
Describe the problem
At the moment, SvelteKit does not appear to support using actual bindings when using
adapter-cloudflare
(not sure aboutadapter-cloudflare-workers
). This resulted in projects likecf-bindings-proxy
, which give you a function that, whenplatform.env
is not detected, will fetch a separate Worker that served as a proxy for the requested bindings.Describe the proposed solution
Miniflare recently re-added support for
get*()
methods, which allows you to get bindings directly. This can then be used in conjunction withadapter.emulate()
to pass bindings, cache,req.cf
info, and the ctx object, allowing SvelteKit local dev to come closer to how it functions when deployed.Alternatives considered
This could also be remedied by running the entire SvelteKit dev server within
workerd
/wrangler
, but support for that from both the Cloudflare and SvelteKit team seems a way off.Importance
would make my life easier
Additional Information
Accidentally made #11786 after pushing to my fork, I'll leave it up as an example/able to push it if y'all think it is a good idea.
The text was updated successfully, but these errors were encountered: