Replies: 1 comment 1 reply
-
@eparizzi if that case, you can get those from
This is something just came to my mind. I didn't test it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I want to expose some environment variables from the server to the browser during the initial request.
I'd want something like using
getServerSideProps
in_app
which doesn't seem to be supported.I don't want to use
NEXT_PUBLIC
because that replaces the values at build time and I want the same build to be deployable to multiple environments, with different environment variables, without the need to build for each one.Is my only option to create some /api routes and request those in the client?
These are configuration values that I need through the whole app and I was thinking that there should be a simple way to expose these values during initial server rendering and without the need to inject the actual values during build.
Am I missing something here?
Beta Was this translation helpful? Give feedback.
All reactions