metro/react-packager
David Aurelio 907f08a794 Use array lookup for localized dependency IDs
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
2016-11-17 08:58:55 -08:00
..
src Use array lookup for localized dependency IDs 2016-11-17 08:58:55 -08:00
.npmignore [react-packager][streamline oss] Move open sourced JS source to react-native-github 2015-02-19 21:25:11 -08:00
index.js New file watching implementation 2016-11-16 20:13:26 -08:00
rn-babelrc.json Use "babel-preset-react-native" 2016-02-03 08:15:32 -08:00