-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.ts
95 lines (89 loc) · 2.61 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import { ExpoConfig } from '@expo/config';
import { EASConfig } from 'expo-constants/build/Constants.types';
import { AppEnv } from './libs/shared/utils/app-env/env';
export type AppEnvName = 'development' | 'staging' | 'production';
export type AppExpoConfig = ReturnType<typeof createConfig>;
const createConfig = (): Omit<ExpoConfig, 'extra'> & {
extra: { eas: EASConfig } & typeof extra;
experiments: { tsconfigPaths: boolean };
} => {
const appEnv = new AppEnv((process.env.APP_ENV as AppEnvName) || 'development');
const projectId = '46e76b70-a4ff-4935-83ca-aaae5a36d7f0';
const extra = {
env: appEnv.current,
eas: { projectId }
};
return {
experiments: {
tsconfigPaths: true
},
name: appEnv.select({
development: 'RN Starter Dev',
staging: 'RN Starter Stg',
production: 'RN Starter Prod'
}),
slug: 'react-native-starter-dev',
scheme: appEnv.select({
development: 'rnstarterdev',
staging: 'rnstarterstg',
production: 'rnstarter'
}),
owner: 'ronas_it',
version: '0.0.1',
runtimeVersion: {
policy: 'sdkVersion'
},
updates: {
url: `https://u.expo.dev/${projectId}`
},
orientation: 'portrait',
backgroundColor: '#000000',
icon: './libs/shared/ui/ui-kit/assets/images/icon.png',
splash: {
image: './libs/shared/ui/ui-kit/assets/images/splash.png',
resizeMode: 'contain',
backgroundColor: '#000000'
},
userInterfaceStyle: 'dark',
ios: {
buildNumber: '1',
supportsTablet: false,
bundleIdentifier: appEnv.select({
development: 'com.ronasit.rnstarter.dev',
staging: 'com.ronasit.rnstarter.stg',
production: 'com.ronasit.rnstarter'
}),
backgroundColor: '#000000'
},
android: {
versionCode: 1,
package: appEnv.select({
development: 'com.ronasit.rnstarter.dev',
staging: 'com.ronasit.rnstarter.stg',
production: 'com.ronasit.rnstarter'
}),
permissions: []
},
plugins: ['expo-localization', 'sentry-expo'],
web: {
favicon: './libs/shared/ui/ui-kit/assets/images/favicon.png',
bundler: 'metro'
},
// TODO: Configure this to use Sentry or remove
// hooks: {
// postPublish: [
// {
// file: 'sentry-expo/upload-sourcemaps',
// config: {
// url: 'https://your-sentry-url',
// organization: 'your-sentry-organization',
// project: 'your-sentry-project',
// }
// }
// ]
// },
// plugins: ['sentry-expo'],
extra
};
};
module.exports = createConfig;