Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minify flag to react-native bundle command
Summary: We have found that it is useful to work with production rather than dev bundles when working on e.g. performance and animation tuning. For a larger app, `react-native bundle` with `--dev false` can get very slow due to minification - in our case, this was especially true of library code (e.g. the AWS SDK taking nearly 15 secs to minify on a top-spec MBP 15"). This is fine when just building every now and then, but when making frequent changes and rebuilding, it becomes quite painful. Currently there is no way to perform a release (non-dev) build, with minification disabled. This PR adds an optional `--minify` flag to enable developers to disable minification, reducing build times significantly for our use case. Checked output bundle size, to ensure behaviour stays the same as the existing default when `--minify` is not specified, and that the `minify` flag gets passed through to Metro bundler correctly if specified. N/A [GENERAL] [ENHANCEMENT] [Bundler] - Added optional --minify flag to bundler Closes #17702 Differential Revision: D6806356 Pulled By: shergin fbshipit-source-id: c466a2dea692561f8b2002118662c3affc71b991
- Loading branch information