Skip to content

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

tutorial-env-vars

Deploy to Light Cloud

A tiny Vite site used in the Light Cloud tutorial Environment variables and secrets: build time vs run time.

It prints the VITE_* values baked into its build, and shows that a variable without the VITE_ prefix never reaches the browser.

flowchart LR
  vars[Environment variables in Light Cloud] -->|at build time| build[npm run build]
  build -->|VITE_* values written into the JavaScript| dist[dist/assets/*.js]
  dist --> browser[Every visitor's browser]
  vars -. not VITE_ .-x dist
Loading

Run it

npm install
cp .env.example .env.local   # then edit the values
npm run dev

Releases

Packages

Contributors

Languages