zetachang / react-native-dotenv

A Babel preset let you import application configs from .env file (zero runtime dependency)
MIT License
915 stars 68 forks source link

Add optional whitelist and defaults #77

Open robbie-c opened 4 years ago

robbie-c commented 4 years ago

Sometimes you don't want to pull in your entire .env file, and would rather have a whitelist for the keys that are accepted. This adds that whitelist.

I've also added a defaults object, which provides values that we fallback to if keys are not present in the .env file

goatandsheep commented 4 years ago

There's a new repo and package babel-plugin-dotenv-import. Please reopen in the new repo