Vite env vars are baked in at build time; changing them needs a rebuild
@sumit▲ 0 net votes
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.