docs: add cloudflare workers section#1808
Conversation
Cloudflare Workers is going to be in the future the main way to deploy application on Cloudflare, presenting it first makes sense. This also includes some re-organizing of the cloudflare pages section.
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
|
The current config and docs are valid 💯 Thinking would be better advise new users to use the new managed export default defineNuxtConfig({
compatibilityDate: "2025-03-01",
nitro: { cloudflare: { nodeCompat: true, deployConfig: true } }
});It generates all proper config (including compat flags and asset binding with valid path). Cloudflare starter template for Nuxt already updated with this and Nitro docs should be updated as well. |
I don't mind making the change, but what is the behaviour of this flag ? Should we meet in the middle and recommend in this docs using deployConfig as an alternative to the user controlled wrangler.jsonc ? There's a subset of user that definitely prefer avoiding the abstractions. |
|
Yes, it will be merged if the user config exists. We had been working with the cloudflare team for months to achieve this functionality (that is the default for the ongoing vite plugin and new nitro) -- it is only not enabled today because cloudflare needs safer migration for existing deployments. |
|
@pi0 got it, I made changes to recommend the use of these flags and provided more context. |
emily-shen
left a comment
There was a problem hiding this comment.
Left some comments from the Cloudflare side, thanks so much for putting up this PR 🧡
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com>
|
@pi0 I stumbled back onto this, made some changes to resolve the comments, resolved merge conflicts and added a section on advanced configuration. What do you think ? It's been open for 6 months now, so please feel free to make necessary changes directly to get this merged. |
Cloudflare Workers is going to be in the future the main way to deploy application on Cloudflare, presenting it first makes sense. This also includes some re-organizing of the cloudflare pages section.
🔗 Linked issue
❓ Type of change
📚 Description