DEV vs PROD envs

hey guys i have a question about managing DEV and PROD envs...
im using cloudflare pages and workers

right now, i have a wrangler.toml file for the workers and it has something like [env.luciaprod.vars] a then i run wrangler dev --env luciaprod and it spits out all the vars, which is awesome.

one of those vars is DEV_OR_PROD="DEV" which i use as a toggle for the backend. but id also like to use it as a toggle for the frontend!

in fact, i'm a noob, so i have a DevOrProd.ts where i have all the conditionals. and i'm trying to use that for frontend and back, but not really working out for me...

any advice?
it seems like i cant pull from the .env when using wrangler so thats my trouble. using sveltekit btw for framework
Was this page helpful?