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

Function loadWranglerPublicVars

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

Source from the content-addressed store, hash-verified

34};
35
36const loadWranglerPublicVars = () => {
37 const wranglerConfig = unstable_readConfig(
38 { config: fileURLToPath(new URL("./wrangler.jsonc", import.meta.url)) },
39 { hideWarnings: true },
40 );
41 return Object.fromEntries(
42 Object.entries(wranglerConfig.vars ?? {}).filter(([key]) => key.startsWith("VITE_PUBLIC_")),
43 );
44};
45
46// VITE_PUBLIC_ANALYTICS_PATH is generated once per build by `scripts/build.mjs`
47// 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