mirror of https://github.com/status-im/metro.git
907f08a794
Summary: The current transform for require calls replaces strings with module-local IDs. That means that each module would need a local require function. To save hundreds of closure allocations, we can just use an array that maps local IDs to global IDs. This diff changes the dependency collection and replacement transform to change a call like `require('React')` to something like `require(_dependencyMap[0])` rather than `require(0)`. Reviewed By: cpojer Differential Revision: D4153714 fbshipit-source-id: a63455834c6c2a75da6977cacb9aac9f2cb1b3aa |
||
---|---|---|
.. | ||
src | ||
.npmignore | ||
index.js | ||
rn-babelrc.json |