mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
PR-URL: https://github.com/nodejs/node/pull/29866 Backport-PR-URL: https://github.com/nodejs/node/pull/33055 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
18 lines
632 B
JavaScript
18 lines
632 B
JavaScript
'use strict';
|
|
|
|
const {
|
|
prepareMainThreadExecution
|
|
} = require('internal/bootstrap/pre_execution');
|
|
|
|
prepareMainThreadExecution(true);
|
|
|
|
markBootstrapComplete();
|
|
|
|
// Note: this loads the module through the ESM loader if the module is
|
|
// determined to be an ES module. This hangs from the CJS module loader
|
|
// because we currently allow monkey-patching of the module loaders
|
|
// in the preloaded scripts through require('module').
|
|
// runMain here might be monkey-patched by users in --require.
|
|
// XXX: the monkey-patchability here should probably be deprecated.
|
|
require('internal/modules/cjs/loader').Module.runMain(process.argv[1]);
|