how to pass a process.env value from SSR context to client?
I have a .env variable for my API (let's say
my implementation was:
the problem is, in ssr.rsx
is there a way to accomplish what I'm trying to do here without adding the
process.env.SERVER_API) and I want to make it available in my client. one way I thought to do this was context so my file route components could access it as:my implementation was:
the problem is, in ssr.rsx
process.env.SERVER_API resolves to a value but in the client process.env.SERVER_API is undefined.is there a way to accomplish what I'm trying to do here without adding the
VITE_ prefix? I would prefer to use one env variable and not duplicate it for the client