Cloudflare Adapter: Support for getPlatformProxy(), 'cache' and 'cf' object for local developments #196
Closed
flikteoh
started this conversation in
Proposals For Qwik
Replies: 1 comment 1 reply
-
thanks for the proposal @flikteoh ! We're currently exploring moving to a nitro based approach, where most of these features are already implemented and maintained, so closing this in favor of that effort, feel free to re-open in the future if this isn't added with the nitro integration thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is it about?
Support for Wrangler's getPlatformProxy() with cache and cf object
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
getPlatformProxy
Any other context or information you want to share:
While Qwik already has Cloudflare Pages Adapter implemented for Cloudflare Pages deployment, it lacks the abilities to work with their cache API and cf objects, locally.
We have to deploy to a development domain for every iterations (due to local dev breaks with
cache is not defined
), which consumes a lot of time for the builds ( > 1min per iteration).This issue has previously been brought up for Cloudflare Pages, now with Cloudflare adding frameworks support for Workers with Assets, which their blog post mentioned that Qwik is also able to develop locally with services bindings.
Frameworks like SvelteKit, Astro, Remix has implemented this via Wrangler's getPlatformProxy API.
It would be nice if this can also be supported in Qwik.
Proposed Solution / Feature
What do you propose?
Update Cloudflare Pages Adapter to include
cache
andcf
object, via getPlatformProxy()Code examples
https://github.com/withastro/adapters/blob/5391c024f1cd0b66b2db26c25e695cf76788b890/packages/cloudflare/src/index.ts#L196-L204
https://github.com/QwikDev/qwik/blob/7558018276e76441570c379351d7b3973b748fa4/packages/qwik-city/src/middleware/cloudflare-pages/index.ts#L144-L148
Links / References
Beta Was this translation helpful? Give feedback.
All reactions