Command Palette

Search for a command to run...

Hectal
Phase 23: Build, Deploy and Run in Production
React · Exercise 1 of 5Next
Intermediate

Only public variables reach the browser

env holds everything the build machine knows, secrets included. Finish publicEnv(all) so it returns only MODE and the variables whose names start with VITE_, the way Vite decides what goes into the bundle.

The page lists what publicEnv returns inside <ul id="env">, one <li> per variable as NAME = value. Keep that markup.

What Check tests

  1. The list shows exactly three variables
  2. VITE_API_URL is shown with its value
  3. MODE is shown
  4. No secret appears anywhere on the page

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.