react-native/local-cli/bundle
David Aurelio 9d09efdd53 transform before extracting dependencies
Summary:Make packager transform files before extracting their dependencies.

This allows us to extract dependencies added by transforms (and to avoid including them manually).

It also allows for better optimization and to get rid of the “whole program optimization” step:
This diff utilizes the new worker introduced in D2976677 / d94a567 – that means that minified builds inline the following variables:

- `__DEV__` → `false`
- `process.env.NODE_ENV` → `'production'`
- `Platform.OS` / `React.Platform.OS` → `'android'` / `'ios'`

and eliminates branches of conditionals with constant conditions. Dependency extraction happens only after that step, which means that production bundles don’t include any modules that are not used.

Fixes #4185

Reviewed By: martinbigio

Differential Revision: D2977169

fb-gh-sync-id: e6ce8dd29d1b49aec49b309201141f5b2709da1d
shipit-source-id: e6ce8dd29d1b49aec49b309201141f5b2709da1d
2016-03-08 09:51:26 -08: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 transform before extracting dependencies 2016-03-08 09:51:26 -08:00
assetPathUtils.js Load assets from same folder as JSbundle (Android) 2016-01-06 08:46:35 -08:00
buildBundle.js transform before extracting dependencies 2016-03-08 09:51:26 -08:00
bundle.js Add unbundling to packager 2015-12-01 08:48:30 -08: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 unbundling to packager 2015-12-01 08:48:30 -08:00