Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add file priority to README #170

Closed
miwialex opened this issue May 30, 2021 · 6 comments · Fixed by #194
Closed

add file priority to README #170

miwialex opened this issue May 30, 2021 · 6 comments · Fixed by #194

Comments

@miwialex
Copy link

Currently the README doesn't specify the priority of which the .env files get loaded. Based on how other packages set priority on the files, I assumed that .env.production had higher priority than .env.local, however after not getting the expected results and looking through the source code, I see that .env.local is the highest priority. Perhaps this should be added to the README so that people know exactly how the variables are loaded. Also, I see that the library currently doesn't support .env.development.local style files, so perhaps that might be worth looking into as well.

@github-actions
Copy link

Hey, thank you for opening this issue! 🙂 To boost priority on this issue and support open source please tip the team at https://issuehunt.io/r/goatandsheep/react-native-dotenv/issues/170

@goatandsheep
Copy link
Owner

that is a great point!

@goatandsheep
Copy link
Owner

take a look at https://www.npmjs.com/package/dotenv-flow . I will add the link to the README

@miwialex
Copy link
Author

@goatandsheep thanks for the reply, and this is helpful. If you look here https://www.npmjs.com/package/dotenv-flow#variables-overwritingpriority it states that .env.local should have lower priority than .env.production. However, the way react-native-dotenv currently works is, it treats .env.local as the highest priority file.

@goatandsheep
Copy link
Owner

goatandsheep commented Jun 30, 2021

I think you're right. This will be a breaking change but you're right. Thanks for pointing this out! I'll investigate ASAP

@goatandsheep goatandsheep reopened this Jun 30, 2021
@github-actions
Copy link

Hey, thank you for opening this issue! 🙂 To boost priority on this issue and support open source please tip the team at https://issuehunt.io/r/goatandsheep/react-native-dotenv/issues/170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants