SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

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
D
David Aurelio committed
9d09efdd53017877328a9fbaef2fd2cfd31352fc
Parent: 87c2688
Committed by Facebook Github Bot 0 <facebook-github-bot-0-bot@fb.com> on 3/8/2016, 5:51:26 PM