You’re not missing a plugin — this is expected behavior.
In React Router v7 (Framework Mode), Vercel’s injected environment variables are only available on the server, so you can access them inside loaders/actions via process.env.
However, Vite only exposes variables that you define and that start with VITE_, so they show up in import.meta.env.
Vercel’s automatic system env vars (e.g. VERCEL_URL, VERCEL_REGION, etc.) are not injected into Vite for security reasons, so they will never appear in import.meta.env.
✔ Why it works this way
✔ How to access a Vercel env on the client
If you want a variable available in import.meta.env, you must create it manually in Vercel:
-
Go to Vercel Dashboard → Project → Environment Variables
-
Add a new variable that starts with VITE_