Update with-universal-configuration example
Feature request
Is your feature request related to a problem? Please describe.
It is confusing for new users to get environment variables set up because there are examples that do not work, and there is an officially supported way of doing environment variables now
https://github.com/zeit/next.js#exposing-configuration-to-the-server--client-side
Describe the solution you'd like
Remove with-universal-configuration from the repo
Describe alternatives you've considered
Open to keeping them if someone shows a unique use case.
It actually serves 2 use cases:
with-universal-configuration - shows build time transpilation of environment variables. Should probably be renamed to with-universal-configuration-build-time
with-universal-configuration-runtime - should show the publicRuntimeConfig implementation. This means that environment variables can be set at runtime, but also means they have to be sent in the pre-rendered document so they have a very small cost
Hi @timneutkens,
I could take this one.
@davcro cool 👍 thanks!
@davscro ideally we also mention both use cases in the readme so that users can choose what fits them 👍
I made a change which explains best how to set up a universal application in PR #5948. I believe that changes are enough to close this issue.
Yep perfect 🙌