I used a create-react-app
.
And created environment variable files. .env.local
, .env.development.local
I found that .env.development
ispreferred over .env.local
And env.development.local
seems to have prioty over .env.development
.
If so, .env.development.local
is used to override .env.development
what is the purpose of .env.local
?
In .env.local
you can set up environment variables that are specific to your local machine and it doesn't have to be on development mode to work, so variables there will work for both development
and production
.