mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-30 17:18:41 +08:00
Strip dev only modules
Summary: public Make sure some modules that are only available in dev mode are only included in dev bundles. Depends on: D2663838 Reviewed By: davidaurelio Differential Revision: D2663889 fb-gh-sync-id: 42be40b865ef305828b3519556125af090ec61f4
This commit is contained in:
committed by
facebook-github-bot-7
parent
9e670a64fc
commit
7a794cc72b
@@ -180,9 +180,11 @@ function setUpNumber() {
|
||||
|
||||
function setUpDevTools() {
|
||||
// not when debugging in chrome
|
||||
if (__DEV__ && !window.document && require('Platform').OS === 'ios') {
|
||||
var setupDevtools = require('setupDevtools');
|
||||
setupDevtools();
|
||||
if (__DEV__) { // TODO(9123099) Strip `__DEV__ &&`
|
||||
if (!window.document && require('Platform').OS === 'ios') {
|
||||
var setupDevtools = require('setupDevtools');
|
||||
setupDevtools();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +204,8 @@ setUpDevTools();
|
||||
|
||||
// Just to make sure the JS gets packaged up. Wait until the JS environment has
|
||||
// been initialized before requiring them.
|
||||
require('RCTDebugComponentOwnership');
|
||||
if (__DEV__) {
|
||||
require('RCTDebugComponentOwnership');
|
||||
}
|
||||
require('RCTDeviceEventEmitter');
|
||||
require('PerformanceLogger');
|
||||
|
||||
Reference in New Issue
Block a user