-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.ts
24 lines (22 loc) · 950 Bytes
/
app.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { ConfigContext } from '@expo/config';
import { config } from 'dotenv';
import * as env from 'env-var';
config();
const EXPO_PUBLIC_API_BASE_URL = env.get('EXPO_PUBLIC_API_BASE_URL').required().asString();
const EXPO_PUBLIC_DISABLE_ANALYTICS = env.get('EXPO_PUBLIC_DISABLE_ANALYTICS').default('false').asBool();
const EXPO_PUBLIC_QNA_API_BASE_URL = env.get('EXPO_PUBLIC_QNA_API_BASE_URL').required().asString();
const EXPO_PUBLIC_ENABLE_QNA = env.get('EXPO_PUBLIC_ENABLE_QNA').default('true').asBool();
const EXPO_PUBLIC_ARCHIVE = env.get('EXPO_PUBLIC_ARCHIVE').default('false').asBool();
export default ({ config }: ConfigContext) => {
return {
...config,
extra: {
apiBaseUrl: EXPO_PUBLIC_API_BASE_URL,
disableAnalytics: EXPO_PUBLIC_DISABLE_ANALYTICS,
qnaApiBaseUrl: EXPO_PUBLIC_QNA_API_BASE_URL,
enableQna: EXPO_PUBLIC_ENABLE_QNA,
archive: EXPO_PUBLIC_ARCHIVE,
...config.extra,
},
};
};