-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Cloudflare Pages build option (again) #1279
Comments
If it's a long-term decision, we could separate two options: And, it depends on how much percentage of waku + cloudflare users need Pages. Another option is to allow a user-defined deploy adapter. |
Could it be possible to pass a string in cli and then attempt to load that? Similar to the new string middleware config? waku build --with-adapter './my-build-adapter' That would work with a local ./my-build-adapter.ts in the root of my project and also open up for community waku build adapters hosted on npm. |
Yeah, I like the custom build plugin approach. Actually, it should already be possible with |
@dai-shi I would like to attempt this if you have any guidance (@rmarscher too - not sure if much has changed in Waku since we last implemented the CF pages plugin). I like the idea of giving users a I obviously don't have telemetry data related to Waku, but some other thoughts I have... CF Pages support is important because people look to Waku as a Next.js alternative in many ways:
I know it is technically possible to deploy Next.js to CF Pages with next-on-pages, but my understanding is that the size of Next.js' dependencies means you basically hit the max size restriction before even building your app. |
@jkhaui Thanks for your interest. As far as I understand, Cloudflare will support all pages features in workers. So, I would like to keep
I'd highly recommend trying that ☝ , and if it goes well, we can write a guide in ./docs/guides/. Even further, create a plugin package and consider |
I started looking at it and I think we probably need to export an unstable builder API with the lib/constants, lib/builder/constants, and |
We updated our
--with-cloudflare
build option from Cloudflare Workers to Cloudflare Pages and then back to Cloudflare Pages with Static Assets.Related:
I found that while Cloudflare Pages' advanced mode function and Cloudflare Workers are almost the same, it seems that Cloudflare Pages' advanced mode function runs after Cloudflare's edge cache while a Cloudflare Worker always runs before the cache. cloudflare/cloudflare-docs#20445
For sites that want to do SWR, it can be better to leverage Cloudflare's cache rules instead of using Cloudflare's cache API from within a worker.
The text was updated successfully, but these errors were encountered: