mirror of https://github.com/status-im/metro.git
require.js: Delete dependency map after factory ran
Summary: Releases the dependency map of modules after running the factory in release mode in order to save memory. Reviewed By: cpojer Differential Revision: D5086693 fbshipit-source-id: 68c57a2f98182ed1a732e1336e6d4fe5ce27abc3
This commit is contained in:
parent
b1eb0bbee5
commit
516367f971
|
@ -177,6 +177,7 @@ function loadModuleImplementation(moduleId, module) {
|
|||
if (!__DEV__) {
|
||||
// $FlowFixMe: This is only sound because we never access `factory` again
|
||||
module.factory = undefined;
|
||||
module.dependencyMap = undefined;
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
|
|
Loading…
Reference in New Issue