From 782d0838be66ec9b27f5014486e36fd93fdc07de Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Thu, 21 Jan 2016 13:57:32 -0800 Subject: [PATCH] =?UTF-8?q?Add=20ability=20to=20load=20=E2=80=9Cunbundles?= =?UTF-8?q?=E2=80=9D=20to=20android?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: public This adds the ability to load “unbundles” in RN android apps. Unbundles are created by invoking the packager with the `unbundle` command rather than `bundle`. The code detects usage of an “unbundle” by checking for the existence of a specific asset. Reviewed By: astreet Differential Revision: D2739596 fb-gh-sync-id: d0813c003fe0fa7b47798b970f56707079bfa5d7 --- react-packager/src/Resolver/polyfills/require-unbundle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-packager/src/Resolver/polyfills/require-unbundle.js b/react-packager/src/Resolver/polyfills/require-unbundle.js index c6c7cbc7..df75ae14 100644 --- a/react-packager/src/Resolver/polyfills/require-unbundle.js +++ b/react-packager/src/Resolver/polyfills/require-unbundle.js @@ -1,6 +1,6 @@ 'use strict'; -const {ErrorUtils, __nativeRequire} = global; +const {ErrorUtils, nativeRequire} = global; global.require = require; global.__d = define; @@ -32,7 +32,7 @@ function guardedLoadModule(moduleId, module) { function loadModuleImplementation(moduleId, module) { if (!module) { - __nativeRequire(moduleId); + nativeRequire(moduleId); module = modules[moduleId]; }