-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.config.ts
More file actions
26 lines (24 loc) · 847 Bytes
/
app.config.ts
File metadata and controls
26 lines (24 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { ExpoConfig, ConfigContext } from 'expo/config';
import 'dotenv/config';
// Helper function to ensure environment variables are defined
const getEnvVar = (name: string): string => {
const value = process.env[name];
if (!value) {
throw new Error(`Missing environment variable: ${name}`);
}
return value;
};
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: "Your App Name",
slug: "your-app-slug", // Required field
// ... other required expo config fields
extra: {
apiKey: process.env.API_KEY || "", // Use empty string as fallback
authDomain: process.env.AUTH_DOMAIN || "",
projectId: process.env.PROJECT_ID || "",
storageBucket: process.env.STORAGE_BUCKET || "",
messagingSenderId: process.env.MESSAGING_SENDER_ID || "",
appId: process.env.APP_ID || "",
},
});