Use enviroment variables in the build.
Ernesto R. C. Pereda
Could be useful that the build detects if a
.env
file exists in the root file and used that variables in the build. Even better if you can specify some kind of flag like --production
or --staging
and the build search for .env.production
and .env.staging
.We can used to put backend urls and secret keys.
t
trajano
It's supported as of Expo 49 https://docs.expo.dev/guides/environment-variables/
Ernesto R. C. Pereda
I found this project https://github.com/Preposterous/exp-deploy-cli/ I think something like this could be really helpful
Peter Piekarczyk
Ernesto R. C. Pereda: Hey! Let me know if this works out for you. Feel free to create any issues if something isn't working right :) Thanks!
Ernesto R. C. Pereda
Peter Piekarczyk: Sure thing. I going to give it a try this week. Thank you very much.