Description
As of now, we can disable the Profiling build mechanism by setting the second argument as false:
withReactNativeReleaseInspector(config, false)
This works well BUT we still have an import in index.js:
import '@callstack/react-native-release-inspector';
We need to disable the functionality inside this module as well.
To achieve this, we can:
In package:
- Expose a process environment variable like:
INSPECTOR_ENABLED
- Rely
metro.index and src/index on this variable to toggle profiling functionality
User Facing:
withReactNativeReleaseInspector(config, process.env.INSPECTOR_ENABLED)
- Supply this env var, for eg:
INSPECTOR_ENABLED=true react-native start
Description
As of now, we can disable the Profiling build mechanism by setting the second argument as
false:This works well BUT we still have an import in
index.js:We need to disable the functionality inside this module as well.
To achieve this, we can:
In package:
INSPECTOR_ENABLEDmetro.indexandsrc/indexon this variable to toggle profiling functionalityUser Facing:
metro.configto:INSPECTOR_ENABLED=true react-native start