mirror of https://github.com/status-im/metro.git
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:
parent
176a6df94c
commit
782d0838be
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue