Separate node polyfills from runtime transforms

Summary: Separates the polyfills used for node.js from the configuration of `babel-register`, to make pretransforming packager before invoking it easier.

Reviewed By: cpojer

Differential Revision: D4978047

fbshipit-source-id: 45d3d49d0a714a8257be8d244a01e41b68bbce3d
This commit is contained in:
David Aurelio 2017-05-02 05:28:15 -07:00 committed by Facebook Github Bot
parent 41518caa3d
commit 1adb318589
2 changed files with 15 additions and 3 deletions

View File

@ -8,9 +8,7 @@
*/
'use strict';
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');
require('./setupNodePolyfills');
var _only = [];

View File

@ -0,0 +1,14 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* 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.
*/
'use strict';
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');