You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blitz being a framework on top of next js, I think it should behave very similar in standard functionality such as environment configuration. However there is currently a big difference in the order in which environment variables are loaded.
Imagine you have the following files
.env.local FAVORITE_COLOR=green
.env.development FAVORITE_COLOR=red
At runtime when running on next with next dev the value of FAVORITE_COLOR will be green because naturally your local config via .env.local has precedence over the default development config via .env.development, see docs. However if you run this with blitz via blitz dev, FAVORITE_COLOR will be red. I would highly recommend sticking to the next js order of loading env vars! what do you think?
What is the problem?
Blitz being a framework on top of next js, I think it should behave very similar in standard functionality such as environment configuration. However there is currently a big difference in the order in which environment variables are loaded.
Imagine you have the following files
.env.local
FAVORITE_COLOR=green
.env.development
FAVORITE_COLOR=red
At runtime when running on next with
next dev
the value ofFAVORITE_COLOR
will begreen
because naturally your local config via.env.local
has precedence over the default development config via.env.development
, see docs. However if you run this with blitz viablitz dev
,FAVORITE_COLOR
will bered
. I would highly recommend sticking to the next js order of loading env vars! what do you think?The text was updated successfully, but these errors were encountered: