From 78b82200a6214d60e50b2eb07496f8d9387fff9f Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Sat, 19 Apr 2025 12:09:36 -0400 Subject: [PATCH] Add env --- .gitignore | 1 + babel.config.js | 8 ++++++++ package-lock.json | 13 +++++++++++++ package.json | 1 + 4 files changed, 23 insertions(+) diff --git a/.gitignore b/.gitignore index 6623142..e4daec4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.env node_modules/ .expo/ dist/ diff --git a/babel.config.js b/babel.config.js index 9d89e13..b1a7370 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,5 +2,13 @@ module.exports = function (api) { api.cache(true); return { presets: ['babel-preset-expo'], + plugins: [ + ['module:react-native-dotenv', { + moduleName: '@env', + path: '.env', + safe: false, + allowUndefined: true + }] + ] }; }; diff --git a/package-lock.json b/package-lock.json index 6e5ee7e..f69eff4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "react-dom": "18.3.1", "react-native": "0.76.9", "react-native-actions-sheet": "^0.9.7", + "react-native-dotenv": "^3.4.11", "react-native-dropdown-picker": "^5.4.6", "react-native-gesture-handler": "~2.20.2", "react-native-reanimated": "~3.16.1", @@ -13994,6 +13995,18 @@ "react-native-safe-area-context": "*" } }, + "node_modules/react-native-dotenv": { + "version": "3.4.11", + "resolved": "https://registry.npmjs.org/react-native-dotenv/-/react-native-dotenv-3.4.11.tgz", + "integrity": "sha512-6vnIE+WHABSeHCaYP6l3O1BOEhWxKH6nHAdV7n/wKn/sciZ64zPPp2NUdEUf1m7g4uuzlLbjgr+6uDt89q2DOg==", + "license": "MIT", + "dependencies": { + "dotenv": "^16.4.5" + }, + "peerDependencies": { + "@babel/runtime": "^7.20.6" + } + }, "node_modules/react-native-dropdown-picker": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/react-native-dropdown-picker/-/react-native-dropdown-picker-5.4.6.tgz", diff --git a/package.json b/package.json index 0672668..0697322 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "react-dom": "18.3.1", "react-native": "0.76.9", "react-native-actions-sheet": "^0.9.7", + "react-native-dotenv": "^3.4.11", "react-native-dropdown-picker": "^5.4.6", "react-native-gesture-handler": "~2.20.2", "react-native-reanimated": "~3.16.1",