Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Why depend on babel-plugin-dotenv npm package? #62

Open
aakashsigdel opened this issue Jun 30, 2019 · 1 comment
Open

Why depend on babel-plugin-dotenv npm package? #62

aakashsigdel opened this issue Jun 30, 2019 · 1 comment

Comments

@aakashsigdel
Copy link

I see that there is a local copy of babel-plugin-dotenv. But we don't depend on this, instead we are depending on the babel-plugin-dotenv npm package if user has this installed on node modules.

What is the reasoning behind this?

@aakashsigdel
Copy link
Author

aakashsigdel commented Jun 30, 2019

According to dotenv documentation:

What happens to environment variables that were already set?
We will never modify any environment variables that have already been set. In particular, if there is a variable in your .env file which collides with one that already exists in your environment, then that variable will be skipped. This behavior allows you to override all .env configurations with a machine-specific environment, although it is not recommended.

Currently this library doesn't do that. I want to submit a PR that will align this repo more with dotenv.

The problem is currently we are depending on babel-plugin-dotenv lib even though we have a copy of that lib in this repo. So I am not sure if I should submit the PR to that repo or here.

Since this is a RN specific repo, it makes sense to submit RN specific changes here instead of babel-plugin-dotenv. But for this we will have to depend on the local copy of babel-plugin-dotenv instead of the original npm package.

PR: #63

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

No branches or pull requests

1 participant