From 7a4eda2f70aea5bcbd46d295b873788a100c18bb Mon Sep 17 00:00:00 2001 From: Miguel Jimenez Esun Date: Mon, 17 Jul 2017 03:02:14 -0700 Subject: [PATCH] Remove default polyfills from metro-bundler Reviewed By: davidaurelio Differential Revision: D5423673 fbshipit-source-id: a66655cd72d56eb60a8a79a298ebfbc746b5ad10 --- .flowconfig | 3 +++ Libraries/polyfills/Array.es6.js | 2 ++ Libraries/polyfills/Array.prototype.es6.js | 2 ++ Libraries/polyfills/Number.es6.js | 2 ++ Libraries/polyfills/Object.es6.js | 2 ++ Libraries/polyfills/Object.es7.js | 2 ++ Libraries/polyfills/String.prototype.es6.js | 2 ++ Libraries/polyfills/babelHelpers.js | 2 ++ Libraries/polyfills/console.js | 1 + Libraries/polyfills/error-guard.js | 2 ++ 10 files changed, 20 insertions(+) diff --git a/.flowconfig b/.flowconfig index ea2ae9173eb..2efcdda5665 100644 --- a/.flowconfig +++ b/.flowconfig @@ -19,6 +19,9 @@ ; "node_modules/react-native" but in the source repo it is in the root .*/Libraries/react-native/React.js +; Ignore polyfills +.*/Libraries/polyfills/.* + [include] [libs] diff --git a/Libraries/polyfills/Array.es6.js b/Libraries/polyfills/Array.es6.js index 87c83ed2567..09153c86803 100644 --- a/Libraries/polyfills/Array.es6.js +++ b/Libraries/polyfills/Array.es6.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule Array.es6 * @polyfill + * @nolint */ /* eslint-disable */ diff --git a/Libraries/polyfills/Array.prototype.es6.js b/Libraries/polyfills/Array.prototype.es6.js index 612d3c3849b..3d9e4a53e81 100644 --- a/Libraries/polyfills/Array.prototype.es6.js +++ b/Libraries/polyfills/Array.prototype.es6.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule Array.prototype.es6 * @polyfill + * @nolint */ /* eslint-disable */ diff --git a/Libraries/polyfills/Number.es6.js b/Libraries/polyfills/Number.es6.js index bd669c3c4b8..78af739deab 100644 --- a/Libraries/polyfills/Number.es6.js +++ b/Libraries/polyfills/Number.es6.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule Number.es6 * @polyfill + * @nolint */ /* eslint-disable strict */ diff --git a/Libraries/polyfills/Object.es6.js b/Libraries/polyfills/Object.es6.js index 64943664305..a9807fb176a 100644 --- a/Libraries/polyfills/Object.es6.js +++ b/Libraries/polyfills/Object.es6.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule Object.es6 * @polyfill + * @nolint */ /* eslint-disable strict */ diff --git a/Libraries/polyfills/Object.es7.js b/Libraries/polyfills/Object.es7.js index dc5dc893b54..2147c81d8fc 100644 --- a/Libraries/polyfills/Object.es7.js +++ b/Libraries/polyfills/Object.es7.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule Object.es7 * @polyfill + * @nolint */ (function() { diff --git a/Libraries/polyfills/String.prototype.es6.js b/Libraries/polyfills/String.prototype.es6.js index a033f35efd6..106c34694d1 100644 --- a/Libraries/polyfills/String.prototype.es6.js +++ b/Libraries/polyfills/String.prototype.es6.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule String.prototype.es6 * @polyfill + * @nolint */ /* eslint-disable strict, no-extend-native, no-bitwise */ diff --git a/Libraries/polyfills/babelHelpers.js b/Libraries/polyfills/babelHelpers.js index 51cb4523ec8..e0c62d9175b 100644 --- a/Libraries/polyfills/babelHelpers.js +++ b/Libraries/polyfills/babelHelpers.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule babelHelpers * @polyfill + * @nolint */ /* eslint-disable */ diff --git a/Libraries/polyfills/console.js b/Libraries/polyfills/console.js index c0ae004c38f..96a2a861a33 100644 --- a/Libraries/polyfills/console.js +++ b/Libraries/polyfills/console.js @@ -6,6 +6,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule console * @polyfill * @nolint */ diff --git a/Libraries/polyfills/error-guard.js b/Libraries/polyfills/error-guard.js index b9330506982..fe660e24295 100644 --- a/Libraries/polyfills/error-guard.js +++ b/Libraries/polyfills/error-guard.js @@ -6,7 +6,9 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @providesModule error-guard * @polyfill + * @nolint */ /* eslint-disable strict */