-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
docs(guides/envvars): update Cloudflare description #8018
base: main
Are you sure you want to change the base?
Conversation
This is true for both Cloudflare pages and worker-site with Remix v2.
|
Hi @jabranr, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
@@ -46,7 +46,7 @@ export async function loader() { | |||
} | |||
``` | |||
|
|||
If you're using the `@remix-run/cloudflare-pages` adapter, env variables work a little differently. Since Cloudflare Pages are powered by Functions, you'll need to define your local environment variables in the [`.dev.vars`][dev-vars] file. It has the same syntax as `.env` example file mentioned above. | |||
If you're using the `@remix-run/cloudflare` adapter, env variables work a little differently. Since Cloudflare Pages are powered by Functions, you'll need to define your local environment variables in the [`.dev.vars`][dev-vars] file. It has the same syntax as `.env` example file mentioned above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Cloudflare Pages are powered by Functions
Do we need to alter the wording here too if it's applicable to both pages and workers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. It now applies to both Pages and Worker sites equally although there is a difference still behind the scenes i.e.
- CF Pages are still powered by Functions
- CF Workers with module syntax will only pass environment variables to the context
- CF Workers with service worker syntax (legacy) enable the environment variables globally
The whole paragraph may need a bit of redo.
This is true for both Cloudflare Pages and Workers-site with Remix v2.