You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, environment variables are accessible with process.env, similar to Node.js. I came across an issue today with Lyra: to check if we are running in Node.js or an Edge runtime, they check if process !== undefined and then use an API that is available only on Node.js, but not on Lagon.
Using process.env to hold environment variables might be more challenging for external libraries to know in which environment they are running. Feel free to discuss your thoughts about this below.
TIL about CloudFlare supporting the global environment variables 😅 honestly I agree with process being undefined in workers as they are closer to a browser environment. That being said my suggestion would be to support import.meta.emv which ties in with ESM and suggesting folks who want process.env to use something like the replace plugin from rollup
Great suggestion, I like it. Note that WinterCG might in the future define a unified way to access environment variables across all runtimes: wintercg/environment-metadata#1
Currently, environment variables are accessible with
process.env
, similar to Node.js. I came across an issue today with Lyra: to check if we are running in Node.js or an Edge runtime, they check ifprocess !== undefined
and then use an API that is available only on Node.js, but not on Lagon.Using
process.env
to hold environment variables might be more challenging for external libraries to know in which environment they are running. Feel free to discuss your thoughts about this below.For reference:
Deno.env
: https://doc.deno.land/deno/stable/~/Deno.envThe text was updated successfully, but these errors were encountered: