From 1bbb69355c607601e5af820d24c109d7b5146a9b Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Fri, 1 Feb 2019 17:39:50 -0800 Subject: [PATCH] TM: trimming down module dependencies when getting NativeModules Summary: For now, do `require('NativeModules')` instead of `import {NativeModules} from 'react-native'`. Reviewed By: mdvacca Differential Revision: D13934066 fbshipit-source-id: 5188b11428a4dca8cecd1934e593d89a6e3fde2e --- Libraries/TurboModule/TurboModuleRegistry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/TurboModule/TurboModuleRegistry.js b/Libraries/TurboModule/TurboModuleRegistry.js index a31f736d7..33d2ce8b0 100644 --- a/Libraries/TurboModule/TurboModuleRegistry.js +++ b/Libraries/TurboModule/TurboModuleRegistry.js @@ -10,9 +10,10 @@ 'use strict'; +const NativeModules = require('NativeModules'); + import type {TurboModule} from 'RCTExport'; import invariant from 'invariant'; -import {NativeModules} from 'react-native'; // TODO function get(name: string): ?T {