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