Permalink
Browse files

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
  • Loading branch information...
davidaurelio authored and facebook-github-bot committed May 2, 2017
1 parent 41518ca commit 1adb318589955a5f7bb0d6373b1ab98de8243da4
Showing with 15 additions and 3 deletions.
  1. +1 −3 packager/babelRegisterOnly.js
  2. +14 −0 packager/setupNodePolyfills.js
@@ -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 = [];
@@ -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');

0 comments on commit 1adb318

Please sign in to comment.