diff --git a/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js b/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js index b6337f6709b435..a3a2126d260fad 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js +++ b/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js @@ -128,6 +128,10 @@ function setupProfile() { require('BridgeProfiling').swizzleReactPerf(); } +function setUpProcessEnv() { + GLOBAL.process = {env: {NODE_ENV: __DEV__ ? 'development' : 'production'}}; +} + setUpRedBoxErrorHandler(); setUpTimers(); setUpAlert(); @@ -137,3 +141,4 @@ setUpRedBoxConsoleErrorHandler(); setUpGeolocation(); setUpWebSockets(); setupProfile(); +setUpProcessEnv();