Skip to content
Permalink
Browse files

Make babel-register 7.x backward-compatible with 6.x. (#6268)

  • Loading branch information
loganfsmyth committed Sep 19, 2017
1 parent e98bb3d commit bd734f03fb77fed102de9988130d36b44c7c7d3a
@@ -5,8 +5,10 @@
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-register",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"main": "lib/node.js",
"browser": "lib/browser.js",
"main": "lib/index.js",
"browser": {
"./lib/node.js": "./lib/browser.js"
},
"dependencies": {
"babel-core": "7.0.0-beta.0",
"core-js": "^2.4.0",
@@ -1,3 +1,5 @@
// required to safely use babel/register within a browserify codebase

export default function() {}
export default function register() {}

export function revert() {}
@@ -0,0 +1,15 @@
/**
* This file wraps the compiled ES6 module implementation of register so
* that it can be used both from a standard CommonJS environment, and also
* from a compiled Babel import.
*/

exports = module.exports = function(...args) {
return register(...args);
};
exports.__esModule = true;

const node = require("./node");
const register = node.default;

Object.assign(exports, node);

0 comments on commit bd734f0

Please sign in to comment.
You can’t perform that action at this time.