forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (21 loc) · 702 Bytes
/
index.js
File metadata and controls
23 lines (21 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* @format
*/
// import of polyfills should always be first
import './src/polyfills/PromiseWithResolvers';
import {AppRegistry} from 'react-native';
import App from './src/App';
import Config from './src/CONFIG';
import additionalAppSetup from './src/setup';
// Define EXPO_OS before any imports to prevent console errors from Expo DOM components
if (!process.env.EXPO_OS && __DEV__) {
const {Platform} = require('react-native');
// Create a new process.env object with EXPO_OS defined
const originalEnv = process.env;
process.env = {
...originalEnv,
EXPO_OS: Platform.OS,
};
}
AppRegistry.registerComponent(Config.APP_NAME, () => App);
additionalAppSetup();