TanStackT
TanStack11mo ago
4 replies
good-rose

Accessing env vars in the client

Is there a way to access an env var (parsed via
process.env
in the client? It's a CLIENT_ID that I need to share between client and server.

If I import it directly and/or pass it to the client via loader data I receive some weird errors probably caused by tree shaking removing those variables.
Was this page helpful?