Replies: 2 comments 6 replies
-
Hello @timwachsener 👋 , I believe the following workflow would solve your use-case:
The team is working on these solutions as we speak. If you need a solution now, let me know so I can edit my answer with a workaround. EDIT:
This snippet will be unnecessary once we release "multi-env" support. |
Beta Was this translation helpful? Give feedback.
-
@paulogdm Sounds quite straightforward actually. I guess it would also be possible to use the same build command and just define different environment vars per project. Is there an ETA? Would be great to test this as the project is in the process of being finished. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My use case is this: I have one app that serves multiple domains. The app fetches different data based on the domain (for example translations and CMS pages).
Currently I need to use
getInitialProps
orgetServerSideProps
because that's the only place where thereq.headers.host
is available. But theoretically all this information can be provided at build time via the correct environment as translations and pages don't change that often and don't need to be fetched on every request so that all pages could be generated statically.Some ideas that came to mind:
package.json
(don't know how to use this with Zeit Now)But all this feels not quite right. Is there a go-to route for a project structure like this?
Beta Was this translation helpful? Give feedback.
All reactions