Is there a better way to use environment variables with Cloudflare Pages? #1288
-
Hi Remix community, I bootstrapped a Remix application (with 1. Handler
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It’s undefined because process is a Node thing and Cloudflare Workers doesn’t use Node, they have a different runtime, in other Serverless platforms you could use process.
This is because that specific line is being replaced with the value at build, so when running Remix in dev it will be replaced with the string development and when you build for production it will be replaced with the string production. You can consider it a special case, this is that way because a lot of packages rely on that env variable to change things, one example is React. |
Beta Was this translation helpful? Give feedback.
It’s undefined because process is a Node thing and Cloudflare Workers doesn’t use Node, they have a different runtime, in other Serverless platforms you could use process.
This is because that specific line is being replaced with the value at build, so when running Remix in dev it will be replaced with the string development and when you build for production it will be re…