mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
e2c0c0c680
Fixes https://github.com/nodejs/node/issues/27767 PR-URL: https://github.com/nodejs/node/pull/27768 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
18 lines
488 B
JavaScript
18 lines
488 B
JavaScript
'use strict';
|
|
|
|
const {
|
|
prepareMainThreadExecution
|
|
} = require('internal/bootstrap/pre_execution');
|
|
|
|
prepareMainThreadExecution(true);
|
|
|
|
const CJSModule = require('internal/modules/cjs/loader').Module;
|
|
|
|
markBootstrapComplete();
|
|
|
|
// Note: this actually tries to run the module as a ESM first if
|
|
// --experimental-modules is on.
|
|
// TODO(joyeecheung): can we move that logic to here? Note that this
|
|
// is an undocumented method available via `require('module').runMain`
|
|
CJSModule.runMain();
|