Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babel-register run default register with global module cache #12674

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;