-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `react-native-dotenv` set up did not work where it couldnt find @env like the documentation says to use Instead used babel-blugin-inline-dotenv described in this stackoverflow post: https://stackoverflow.com/questions/57060316/environment-variables-in-babel-config-js This was the `react-native-dotenv` recommended solution that did not work for me facebook/react-native#29351 (comment)
- Loading branch information
Showing
5 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TEST_KEY='help' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
module.exports = function (api) { | ||
api.cache(true) | ||
return { | ||
presets: ['babel-preset-expo'], | ||
}; | ||
}; | ||
env: { | ||
production: { | ||
plugins: [ | ||
[ | ||
'inline-dotenv', | ||
{ | ||
path: '.env.production' | ||
} | ||
] | ||
] | ||
}, | ||
development: { | ||
plugins: [ | ||
[ | ||
'inline-dotenv', | ||
{ | ||
path: '.env.development' | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters