()
| 35 | }; |
| 36 | |
| 37 | const loadWranglerPublicVars = () => { |
| 38 | const wranglerConfig = unstable_readConfig( |
| 39 | { config: fileURLToPath(new URL("./wrangler.jsonc", import.meta.url)) }, |
| 40 | { hideWarnings: true }, |
| 41 | ); |
| 42 | return Object.fromEntries( |
| 43 | Object.entries(wranglerConfig.vars ?? {}).filter(([key]) => key.startsWith("VITE_PUBLIC_")), |
| 44 | ); |
| 45 | }; |
| 46 | |
| 47 | // VITE_PUBLIC_ANALYTICS_PATH is generated once per build by `scripts/build.mjs` |
| 48 | // and inherited via process.env, so the client and SSR/Cloudflare environment |