1'use strict'; 2 3const { 4 prepareMainThreadExecution 5} = require('internal/bootstrap/pre_execution'); 6 7prepareMainThreadExecution(true); 8 9markBootstrapComplete(); 10 11// Note: this loads the module through the ESM loader if the module is 12// determined to be an ES module. This hangs from the CJS module loader 13// because we currently allow monkey-patching of the module loaders 14// in the preloaded scripts through require('module'). 15// runMain here might be monkey-patched by users in --require. 16// XXX: the monkey-patchability here should probably be deprecated. 17require('internal/modules/cjs/loader').Module.runMain(process.argv[1]); 18