Describe the feature
Links:
For a long time, Nitro has not supported Cloudflare environments. However, deploying by environment or enabling development is a very common requirement.
We could customize the main module entry point after compilation, but this would break the nitro/vite dev command.
The Cloudflare vite plugin offers a solution: combining the vite name and the environments name and configuring it using CLOUDFLARE_ENV. This greatly simplifies the generated deploy config (.output/server/wrangler.json).
Alternative: For vite, you can use @cloudflare/vite-plugin as the dev server. This alternative will break nitro dev, which I personally do not recommend.
Additional information
Describe the feature
Links:
For a long time, Nitro has not supported Cloudflare environments. However, deploying by environment or enabling development is a very common requirement.
We could customize the main module entry point after compilation, but this would break the
nitro/vite devcommand.The Cloudflare vite plugin offers a solution: combining the vite name and the environments name and configuring it using
CLOUDFLARE_ENV. This greatly simplifies the generated deploy config (.output/server/wrangler.json).Alternative: For vite, you can use
@cloudflare/vite-pluginas the dev server. This alternative will breaknitro dev, which I personally do not recommend.Additional information