Don't load 'babel-polyfill', only polyfill `Array#values`, `Object.values`, and `Object.entries`

Summary:Instead of loading `'babel-polyfill'` into packager, we only polyfill es6 methods that are unavailable in node 4, and es7 stage 4 proposals.
That makes sure that we are using native promises, and don't load unnecessary polyfills.

Reviewed By: vjeux

Differential Revision: D3168057

fb-gh-sync-id: 68b53795d9a1d7cfdc00fc31684da3ad21a7bb34
fbshipit-source-id: 68b53795d9a1d7cfdc00fc31684da3ad21a7bb34
This commit is contained in:
David Aurelio 2016-04-12 08:28:22 -07:00 committed by Facebook Github Bot 7
parent 43c5ed2be0
commit c16cfc694b
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@
*/
'use strict';
require('babel-polyfill');
Array.prototype.values || require('core-js/fn/array/values');
Object.entries || require('core-js/fn/object/entries');
Object.values || require('core-js/fn/object/values');
var fs = require('fs');
var path = require('path');