avery
CDCloudflare Developers
•Created by avery on 5/8/2025 in #workers-help
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 vite3 replies