Skip to content

Commit

Permalink
babel-register run default register with global module cache
Browse files Browse the repository at this point in the history
Follow-up to PR babel#12665.
  • Loading branch information
overlookmotel committed Jan 22, 2021
1 parent f795fff commit 8674e1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/babel-register/src/node.js
Expand Up @@ -108,8 +108,6 @@ export function revert() {
if (piratesRevert) piratesRevert();
}

register();

export default function register(opts?: Object = {}) {
// Clone to avoid mutating the arguments object with the 'delete's below.
opts = {
Expand Down
3 changes: 3 additions & 0 deletions packages/babel-register/src/nodeWrapper.js
Expand Up @@ -18,4 +18,7 @@ Module._cache = globalModuleCache;
const smsPath = require.resolve("source-map-support");
globalModuleCache[smsPath] = internalModuleCache[smsPath];

const register = node.default;
register();

module.exports = node;

0 comments on commit 8674e1d

Please sign in to comment.