diff --git a/lib/index.js b/lib/index.js index b8aa002c..ec2a0e6b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,7 +30,9 @@ if (typeof Realm != 'undefined') { realmConstructor = require('./browser').default; // (exported as ES6 module) // eslint-disable-next-line } else if (typeof process == 'object' && ('' + process) == '[object process]') { - realmConstructor = require('bindings')('realm').Realm; + // Prevent React Native packager from seeing this module. + const bindings = 'bindings'; + realmConstructor = require(bindings)('realm').Realm; } else { throw new Error('Missing Realm constructor - please ensure RealmReact framework is included!'); }