Commit Graph

2 Commits

Author SHA1 Message Date
Miguel Jimenez Esun 7a4eda2f70 Remove default polyfills from metro-bundler
Reviewed By: davidaurelio

Differential Revision: D5423673

fbshipit-source-id: a66655cd72d56eb60a8a79a298ebfbc746b5ad10
2017-07-17 03:20:02 -07:00
Miguel Jimenez Esun ad0fe15e2e Move polyfills to react-native
Summary:
React Native bundler (aka Metro Bundler) was splitted from the main codebase some time ago (now it lives [[https://github.com/facebook/metro-bundler|here]]). To make it more agnostic, polyfills will be moved out from it, so people who doesn't need them does not include them. However, RN will still need them, so the first step is to copy them back to RN so that we can provide them to Metro Bundler later.

We also include a way of passing the list of polyfills to include, as an `Array<string>`. The field is called `polyfills`, and defaults to the traditional list that is currently included in the package manager [see here](be1843cddc/packages/metro-bundler/src/defaults.js (L27-L37)).

In future commits, `metro-bundler` will be able to manage the `polyfills` array passed to it, and use it, instead of the pre-defined ones.

Reviewed By: davidaurelio

Differential Revision: D5381614

fbshipit-source-id: 749d536b781843ecb3067803e44398cd6df941f1
2017-07-11 03:47:16 -07:00