🚇 The JavaScript bundler for React Native. https://facebook.github.io/metro
Go to file
Miguel Jimenez Esun 263118c84b Make constant folding remove unused functions
Summary:
Patterns like:

```
function x() {
  require('foo');
}

const y = function() {
  require('bar');
}

module.exports = 'potato';
```

Are registering as dependencies `foo` and `bar`, because `x` and `y` are not stripped. This change detects both expressions and declarations, and if the binding is not referenced, the function is dropped.

Reviewed By: davidaurelio

Differential Revision: D8043063

fbshipit-source-id: a1deb2bcea4db6bdbe6b5ac569cbbebd0f4b1c3c
2018-05-21 08:32:06 -07:00
.github Rename metro-bundler to metro 2017-11-30 11:56:25 +00:00
docs Swap out metro-babylon7 for babylon in metro 2018-05-10 08:06:34 -07:00
flow-typed Add automated script to update the babelHelpers file 2018-05-18 06:26:05 -07:00
packages Make constant folding remove unused functions 2018-05-21 08:32:06 -07:00
scripts metro-babel-register: node 6 compat 2018-04-27 07:15:56 -07:00
website Update license headers for MIT license 2018-02-16 18:30:48 -08:00
.babelrc fix support for node v4 2017-06-26 05:08:50 -07:00
.eslintignore Fold .eslintrc's into the root eslintrc 2018-02-15 08:24:07 -08:00
.eslintrc.js Make eslint rules more strict 2018-03-01 06:07:40 -08:00
.flowconfig v0.72.0 in xplat/js 2018-05-11 18:03:04 -07:00
.gitignore ignore build artifacts 2018-03-12 03:53:38 -07:00
.npmignore Initial repository structure. 2017-01-26 12:56:40 +00:00
.travis.yml Initial repository structure. 2017-01-26 12:56:40 +00:00
CHANGELOG.md Rename metro-bundler to metro 2017-11-30 11:56:25 +00:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md 2017-11-22 02:58:16 -08:00
CONTRIBUTING.md Update to MIT license 2018-02-16 18:30:48 -08:00
LICENSE Update to MIT license 2018-02-16 18:30:48 -08:00
README.md dropthe 2018-01-08 03:38:32 -08:00
appveyor.yml Initial repository structure. 2017-01-26 12:56:40 +00:00
circle.yml Add NPM_TOKEN to the npmrc configuration to be able to publish the npm package from circleci 2018-04-11 10:53:53 -07:00
lerna.json Bump metro@0.37.0 2018-05-15 02:49:53 -07:00
package.json Upgrade Jest to 23.0.0-charlie.2 2018-05-15 06:27:56 -07:00
yarn.lock Make constant folding more powerful 2018-05-21 08:32:06 -07:00

README.md

Metro

CircleCI Build Status npm version

🚇 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.

Installation & Documentation

See the Metro website for documentation.