mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 04:15:04 +03:00
Use vite's loadEnv to read the .env hierarchy + process.env, filter to NEXT_PUBLIC_*, and pass them to define so process.env.NEXT_PUBLIC_X is replaced with its value at build time (matching Next.js behaviour). Without this, every process.env.NEXT_PUBLIC_* access in the browser bundle would be undefined since process isn't defined in browsers.