This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
reValuate/node_modules/expo/build/Expo.fx.expo.js

50 lines
2.0 KiB
JavaScript
Raw Normal View History

2021-04-02 02:24:13 +03:00
import './environment/validate.fx';
import './environment/logging.fx';
import './environment/LogBox.fx'; // This must be imported exactly here
import './environment/react-native-logs.fx';
// load expo-asset immediately to set a custom `source` transformer in React Native
import 'expo-asset';
import Constants from 'expo-constants';
import * as Font from 'expo-font';
import { installWebGeolocationPolyfill } from 'expo-location';
import * as React from 'react';
import { AppRegistry, Platform, StyleSheet } from 'react-native';
import DevAppContainer from './environment/DevAppContainer';
if (Constants.manifest && typeof Constants.manifest.env === 'object') {
Object.assign(process.env, Constants.manifest.env);
}
// add the dev app container wrapper component on ios
if (__DEV__) {
if (Platform.OS === 'ios') {
// @ts-ignore
AppRegistry.setWrapperComponentProvider(() => DevAppContainer);
// @ts-ignore
const originalSetWrapperComponentProvider = AppRegistry.setWrapperComponentProvider;
// @ts-ignore
AppRegistry.setWrapperComponentProvider = provider => {
function PatchedProviderComponent(props) {
const ProviderComponent = provider();
return (React.createElement(DevAppContainer, null,
React.createElement(ProviderComponent, Object.assign({}, props))));
}
originalSetWrapperComponentProvider(() => PatchedProviderComponent);
};
}
}
if (StyleSheet.setStyleAttributePreprocessor) {
StyleSheet.setStyleAttributePreprocessor('fontFamily', Font.processFontFamily);
}
// polyfill navigator.geolocation
installWebGeolocationPolyfill();
if (module && module.exports) {
if (global) {
const globals = require('./globals');
// @ts-ignore
global.__exponent = globals;
// @ts-ignore
global.__expo = globals;
// @ts-ignore
global.Expo = globals;
}
}
//# sourceMappingURL=Expo.fx.expo.js.map