Cloudflare DevelopersCD
Cloudflare Developers9mo ago
2 replies
avery

Env Variables in Workers Static Site [Vite + React]

Hey All, I am building a React + Vite app using cloudflare workers. It is a SPA with no workers backend. Is there any documentation around how to get environment variables into the frontend React app? I see everything is focused on how to get them into the workers runtime, but I am looking to access them from the bundled React code, where I normally use import.meta.env with vite
Was this page helpful?