1import { boolish, int } from 'getenv'; 2 3class Env { 4 /** Enable debug logging */ 5 get EXPO_DEBUG() { 6 return boolish('EXPO_DEBUG', false); 7 } 8 9 /** Prevent disabling the `x_facebook_sources` non-standard sourcemap extension when `EXPO_USE_EXOTIC` is enabled. */ 10 get EXPO_USE_FB_SOURCES() { 11 return boolish('EXPO_USE_FB_SOURCES', false); 12 } 13 14 /** Enable the experimental "exotic" mode. [Learn more](https://blog.expo.dev/drastically-faster-bundling-in-react-native-a54f268e0ed1). */ 15 get EXPO_USE_EXOTIC() { 16 return boolish('EXPO_USE_EXOTIC', false); 17 } 18 19 /** The React Metro port that's baked into react-native scripts and tools. */ 20 get RCT_METRO_PORT() { 21 return int('RCT_METRO_PORT', 8081); 22 } 23 24 /** Enable auto server root detection for Metro. This will change the server root to the workspace root. */ 25 get EXPO_USE_METRO_WORKSPACE_ROOT(): boolean { 26 return boolish('EXPO_USE_METRO_WORKSPACE_ROOT', false); 27 } 28 29 /** Disable Environment Variable injection in client bundles. */ 30 get EXPO_NO_CLIENT_ENV_VARS(): boolean { 31 return boolish('EXPO_NO_CLIENT_ENV_VARS', false); 32 } 33} 34 35export const env = new Env(); 36