How to specify variables used in SSR at runtime? #12518
Answered
by
rafaelalmeidatk
michaelschufi
asked this question in
Help
-
We are using SSR for virtually all of our pages, because we fetch content dynamically. That's why there's also no need to resolve environment variables at build time. How can I specify environment variables to be resolved not at buildtime but at runtime? Those variables would be used on the server and client side, but can be different for different environments. |
Beta Was this translation helpful? Give feedback.
Answered by
rafaelalmeidatk
May 5, 2020
Replies: 1 comment 5 replies
-
You can use the Runtime Configuration: https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
michaelschufi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the Runtime Configuration: https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration