What does the VITE_ prefix mean for my keys?

Variables starting with VITE_ are included in the code every visitor downloads, so anyone using your app can read them.

A variable is one named setting, where an app keeps things like its keys (long passwords it uses to prove who it is to another service). The Vite documentation says VITE_ variables are exposed to client-side code after bundling. In plain words, they end up in the code each visitor's browser downloads. The browser is the program people use to open websites, such as Chrome or Safari. The documentation advises against using the prefix for sensitive values, noting they should not contain API keys.

Lovable and Bolt apps commonly use Vite. Keep secrets in server-side functions, which run where visitors cannot look. Reserve VITE_ for values that are made to be seen by everyone, such as a Supabase publishable key.

A quick check: list your variable names and look for any that start with VITE_ and hold a secret. Rename it, move the call to a server-side function, and replace the old key (make a new one and turn the old one off) because it has already been published.

Sources

Each source below was read on 2026-11-16. Documentation changes over time, so check the source for the current wording.

  • Vite documentation, Env variables and modes, accessed 2026-11-16