unexposed-env-read
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when import.meta.env is read for a name @ramonda/build does not expose, so the value reads undefined.
A variable reaches the browser only when its name says so. @ramonda/build exposes the
RAMONDA_PUBLIC_ prefix and nothing else, because the prefix IS the decision to publish —
otherwise adding a line to a .env would be one keystroke away from shipping a secret.
So there are two places to read a variable, and the name says which:
process.env.DATABASE_URL // server only, named however your host names it
import.meta.env.RAMONDA_PUBLIC_API_BASE // compiled into the bundle, readable by anyone
If you are coming from Vite, this is the one that catches you. envPrefix REPLACES Vite's
default rather than adding to it, so VITE_* is no longer exposed — measured, in build and in
dev. Rename the variable, or read it on the server and pass the value down.
The bundler's own names — DEV, PROD, MODE, SSR, BASE_URL — are always available and
are never reported.
This assumes you are using @ramonda/build's Vite plugin, which is what replaces Vite's own
VITE_ prefix. If you configure Vite yourself and left envPrefix alone, VITE_* still works
and this report does not apply to you — which is why it is a warning and not a failure.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.