MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / loadWranglerPublicVars

Function loadWranglerPublicVars

apps/cloud/vite.config.ts:37–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35};
36
37const 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

Callers 1

vite.config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected