Skip to content

Commit

Permalink
babel-register run default register with global module cache (#12674)
Browse files Browse the repository at this point in the history
Follow-up to PR #12665.
  • Loading branch information
overlookmotel committed Jan 25, 2021
1 parent 446c70c commit b727e67
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 @@ -112,8 +112,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 b727e67

Please sign in to comment.