Add ability to load “unbundles” to android

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
This commit is contained in:
David Aurelio 2016-01-21 13:57:32 -08:00 committed by facebook-github-bot-3
parent 176a6df94c
commit 782d0838be
1 changed files with 2 additions and 2 deletions

View File

@ -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];
}