Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add: protect env variable
  • Loading branch information
htnghia1423 committed Apr 29, 2025
commit 08dc4447d5fbee87f5a37ac7ee892a714de557fd
4 changes: 4 additions & 0 deletions @types/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '@env' {
export const SUPABASE_URL: string;
export const SUPABASE_KEY: string;
}
17 changes: 17 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module:react-native-dotenv',
{
moduleName: '@env',
path: '.env',
blocklist: null,
allowlist: null,
safe: false,
allowUndefined: true,
verbose: false,
},
],
],
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
"expo-router": "4.0.20",
"expo-splash-screen": "0.29.24",
"expo-status-bar": "2.0.1",
"metro-react-native-babel-preset": "^0.77.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.9",
"react-native-dotenv": "^3.4.11",
"react-native-modal": "^14.0.0-rc.1",
"react-native-reanimated": "3.16.1",
"react-native-safe-area-context": "4.12.0",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"strict": true,
"paths": {
"@/*": ["./src/*"]
}
},
"typeRoots": ["./node_modules/@types", "./@types"]
},
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
}