How to limit number of workers in react native packager (android)(gradle)?

Looks like we have to wait for next release. The limit number of workers is added in this commit.


In React Native 0.22.0 and later you can limit the number of workers by setting the REACT_NATIVE_MAX_WORKERS environment variable.

As Soe Moe mentioned, this commit added the ability.

This is useful when building in a somewhat low-memory environment, such as a Travis or CircleCI build container.