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

Multi Environments #34

Open
wants to merge 1 commit into
base: master
from

Conversation

@gcorreaalves
Copy link

gcorreaalves commented Dec 30, 2017

Yeah! I know many people have been asking for multi environments. I don't wanna boring you one more time, but I have done some changes to permit that it works. ;)

I know that Babel uses just development or production options, for this reason I changed to read other variable (ENV_FILE) first.

Examples with Expo:
ENV_FILE=.env.production exp p
ENV_FILE=.env.beta exp p --release-channel beta

At my company we have used this solution, and it works pretty well.

I also wrote some tests. So, you decide if it's worth to be included in the project. Even though it is a Babel Plugin, I think so. :)

I created this repository https://github.com/gcorreaalves/babel-plugin-dotenv just to install the package with the new changes for while, otherwise it doesn't work, but if you accept my PR you can republish it on NPM.

@zetachang

This comment has been minimized.

Copy link
Owner

zetachang commented Jan 13, 2018

Hi @gcorreaalves , thanks for working on this! This looks like an elegant solution, have you encounter any issue while building directly with Xcode or Gradle (for Android)?

@gcorreaalves

This comment has been minimized.

Copy link
Author

gcorreaalves commented Jan 31, 2018

Hi @zetachang, I'm glad you have liked it. So far, I haven't tried it using Xcode or Gradle. I gonna do it soon as possible and I let you know if it works.

@bozzmob

This comment has been minimized.

Copy link

bozzmob commented Apr 29, 2018

Any update on this? Will this be merged? This is a good to have PR.

@gcorreaalves

This comment has been minimized.

Copy link
Author

gcorreaalves commented Apr 30, 2018

Hi @bozzmob, unfortunately I haven't tested with Xcode and Gradle yet, but it works pretty well with Expo.

@ashishmusale

This comment has been minimized.

Copy link

ashishmusale commented May 23, 2018

Any update on this?

@mitaxe

This comment has been minimized.

Copy link

mitaxe commented Feb 7, 2019

Any updates?

@gcorreaalves

This comment has been minimized.

Copy link
Author

gcorreaalves commented Feb 7, 2019

Hi guys, I did some tests but on Xcode or Gradle it does not work.

@mitaxe
mitaxe approved these changes Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.