-
Notifications
You must be signed in to change notification settings - Fork 68
Support for multiple environments #28
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for working on this. The bad news is that RN packager will try to overwrite I've always want to file a ticket for RN to claim the need that the packager should allow variant of default dev & product env. (In most use case, |
Ah darn. Let's file a ticket then, so that we could see what they think about it. |
Any news? |
var platformPath = (process.env.BABEL_ENV === 'development' || process.env.BABEL_ENV === undefined) | ||
? configFile + '.development' | ||
: configFile + '.production'; | ||
var platformPath = configFile + (environments[process.env.BABEL_ENV] || environments['development']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cant we use a different ´env´ then BABEL_ENV
to solve the issue with react-native overridin it?
var platformPath = configFile + (environments[process.env.ENV_FILE] ||
then you can run or build you app with $ ENV_FILE =.env.staging npm run ios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad didn't see that it was in the babel plugin. So not possible I guess
any news |
There's a new repo and package babel-plugin-dotenv-import. Please reopen in the new repo |
Closes #19
Reviews and criticisms are gladly welcome. Hope you have the time to check.