react-native-macos/local-cli/bundle
Martín Bigio 8edc35004c Move preloaded modules to startup code section
Summary:We found that moving the preloaded modules to the startup section of the RAM Bundle improves TTI quite a bit by saving lots of through the bridge calls and injecting multiple modules at once on JSC. However, doing this on a non hacky way required a lot of work. The main changes this diff does are:
  - Add to `BundleBase` additional bundling options. This options are fetched based on the entry file we're building by invoking a module that exports a function (`getBundleOptionsModulePath`).
  - Implement `BundleOptions` module to include the `numPreloadedModules` attribute as a bundle additional option. This value is computed by getting the dependencies the entry file has and looking for the first module that exports a module we don't want to preload. The `numPreloadedModules` attribute is then used to decide where to splice the array of modules.
- Additional kung fu to make sure sourcemaps work for both preloaded and non preloaded modules.

Reviewed By: davidaurelio

Differential Revision: D3046534

fb-gh-sync-id: 80b676222ca3bb8b9eecc912a7963be94d3dee1a
shipit-source-id: 80b676222ca3bb8b9eecc912a7963be94d3dee1a
2016-03-23 09:28:31 -07:00
..
__mocks__ Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
__tests__ Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
output Move preloaded modules to startup code section 2016-03-23 09:28:31 -07:00
assetPathUtils.js Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
buildBundle.js Add packager worker for Buck 2016-03-18 12:45:29 -07:00
bundle.js Add packager worker for Buck 2016-03-18 12:45:29 -07:00
bundleCommandLineArgs.js Add infra for Prepack build option 2015-11-20 20:19:25 -08:00
getAssetDestPathAndroid.js Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
getAssetDestPathIOS.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
saveAssets.js bugfix #3997: react-native bundle not working on windows 10 2015-11-27 08:22:29 -08:00
sign.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
signedsource.js Move `private-cli` commands to `local-cli` 2015-10-26 15:36:04 -07:00
unbundle.js Add packager worker for Buck 2016-03-18 12:45:29 -07:00