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

Follow-up to PR #12665.
This commit is contained in:
overlookmotel 2021-01-25 20:51:16 +00:00 committed by GitHub
parent 446c70c6c3
commit b727e67347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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 = {

View File

@ -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;