summaryrefslogtreecommitdiff
path: root/lib/internal/bootstrap/pre_execution.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/bootstrap/pre_execution.js')
-rw-r--r--lib/internal/bootstrap/pre_execution.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index 6b1e3fb213..93ede41419 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -48,6 +48,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
initializeDeprecations();
initializeFrozenIntrinsics();
+ initializeCJSLoader();
initializeESMLoader();
loadPreloadModules();
}
@@ -336,6 +337,10 @@ function initializePolicy() {
}
}
+function initializeCJSLoader() {
+ require('internal/modules/cjs/loader')._initPaths();
+}
+
function initializeESMLoader() {
const experimentalModules = getOptionValue('--experimental-modules');
const experimentalVMModules = getOptionValue('--experimental-vm-modules');
@@ -397,5 +402,6 @@ module.exports = {
loadPreloadModules,
setupTraceCategoryState,
setupInspectorHooks,
- initializeReport
+ initializeReport,
+ initializeCJSLoader
};