metro/packages/metro-bundler
Rafael Oleza 1dec296000 Downgrade uglify-js from 3.1.8 to 3.1.1
Summary:
Uglify@3.1.7 is causing some perf issues (more specifically, this commit: 5b4b07e9a7) that are impacting TTI on RN views and increased memory usage.

More specifically, code like:

```
function nonTrivialFn(pre) {
  return pre + Math.random();
}
function hotFunctionCalledALotOfTimes(num) {
  return nonTrivialFn(num + Math.random());
}
hotFunctionCalledALotOfTimes(3);
hotFunctionCalledALotOfTimes(5);
```

in v3.1.7 gets converted to:

```
function hotFunctionCalledALotOfTimes(num){
  return function(pre) {
    return pre + Math.random();
  }(num + Math.random())
}
hotFunctionCalledALotOfTimes(3);
hotFunctionCalledALotOfTimes(5);
```

This causes a function creation each time `hotFunctionCalledALotOfTimes` is called.

By comparison, in v3.1.6, that previous code was converted to:

```
function nonTrivialFn(pre){
  return pre + Math.random()
}
function hotFunctionCalledALotOfTimes(num){
  return nonTrivialFn(num + Math.random())
}
hotFunctionCalledALotOfTimes(3);
hotFunctionCalledALotOfTimes(5);
```

Reviewed By: jeanlauliac, alexeylang

Differential Revision: D6296740

fbshipit-source-id: b3988d886e607103ec3ae6b9763b2f0411a8aa3c
2017-11-10 04:52:50 -08:00
..
src Add asset size to the module 2017-11-10 03:20:52 -08:00
.eslintrc Add `"node"` env to packager `.eslintrc` 2017-05-19 07:36:26 -07:00
.npmignore npm package has `src/` rather than `build/` 2017-06-23 09:06:33 -07:00
README.md Update README 2017-06-06 03:29:08 -07:00
package.json Downgrade uglify-js from 3.1.8 to 3.1.1 2017-11-10 04:52:50 -08:00
rn-babelrc.json Remove `react-packager` indirection. 2017-02-02 05:34:12 -08:00
yarn.lock metro-bundler: fix Flow errors in OSS 2017-09-08 06:39:36 -07:00

README.md

metro-bundler

🚇 The JavaScript bundler for React Native.

  • 🚅 Fast: We aim for sub-second reload cycles, fast startup and quick bundling speeds.
  • ⚖️ Scalable: Works with thousands of modules in a single application.
  • ⚛️ Integrated: Supports every React Native project out of the box.

This project was previously part of the react-native repository. In this smaller repository it is easier for the team working on Metro Bundler to respond to both issues and pull requests. See react-native#13976 for the initial announcement.