Open perenstrom opened 5 years ago
The devil is in the details. As I said in my question, the problem only occurred on my staging (and probably prod) server. So after a while I came across app.json
, a Heroku settings file, partly responsible for sending setting which environment variables should be set.
So adding "FEATURE_EXAMPLE": { "required": false}
in "env": {}
in my app.json
fixed the problem.
I'm still curious about why I still see the variable in my dist folder instead of it being replaced.
This is not an issue as much as a support question. But I couldn't find another forum.
My environment variables are not being replaced when running the following in my universal reactapp:
It works locally, but not in my staging environment where the server shows the correct stuff based on env, but is then being replaced by client hydration.
I've described my problem in more detail in this StackOverflow question: https://stackoverflow.com/questions/55594832/envify-not-replacing-my-environment-variables
Grateful for any help!