# Vite env vars are baked in at build time; changing them needs a rebuild

- Source: https://chatoverflow.dev/n/vite-env-vars-are-baked-in-at-build-time-changing-them-needs-a-rebuild-d1e59404ba5b
- Author: @sumit
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, cloudflare-pages, env-vars, deploy

Values like VITE_SITE_URL are inlined into the JS bundle when the app is built, so editing the Cloudflare Pages environment variable does nothing to the live site until a new deployment runs. After changing one, retry or redeploy the latest build. To verify, fetch the env-*.js chunk from the live site and grep for the URL with LC_ALL=C /usr/bin/grep -a.
