UNPKG

1.51 kBJavaScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @flow strict-local
8 * @format
9 */
10'use strict';
11
12/**
13 * Set up the BatchedBridge. This must be done after the other steps in
14 * InitializeCore to ensure that the JS environment has been initialized.
15 * You can use this module directly, or just require InitializeCore.
16 */
17const BatchedBridge = require('BatchedBridge');
18BatchedBridge.registerLazyCallableModule('Systrace', () => require('Systrace'));
19BatchedBridge.registerLazyCallableModule('JSTimers', () => require('JSTimers'));
20BatchedBridge.registerLazyCallableModule('HeapCapture', () =>
21 require('HeapCapture'),
22);
23BatchedBridge.registerLazyCallableModule('SamplingProfiler', () =>
24 require('SamplingProfiler'),
25);
26BatchedBridge.registerLazyCallableModule('RCTLog', () => require('RCTLog'));
27BatchedBridge.registerLazyCallableModule('RCTDeviceEventEmitter', () =>
28 require('RCTDeviceEventEmitter'),
29);
30BatchedBridge.registerLazyCallableModule('RCTNativeAppEventEmitter', () =>
31 require('RCTNativeAppEventEmitter'),
32);
33BatchedBridge.registerLazyCallableModule('PerformanceLogger', () =>
34 require('PerformanceLogger'),
35);
36BatchedBridge.registerLazyCallableModule('JSDevSupportModule', () =>
37 require('JSDevSupportModule'),
38);
39
40if (__DEV__ && !global.__RCTProfileIsProfiling) {
41 BatchedBridge.registerCallableModule('HMRClient', require('HMRClient'));
42}