MCPcopy Index your code
hub / github.com/nodejs/node / initializeESM

Function initializeESM

lib/internal/modules/esm/utils.js:303–310  ·  view source on GitHub ↗

* Initializes handling of ES modules. * @param {boolean} [shouldSpawnLoaderHookWorker] Whether the custom loader worker * should be spawned later.

(shouldSpawnLoaderHookWorker = true)

Source from the content-addressed store, hash-verified

301 * should be spawned later.
302 */
303function initializeESM(shouldSpawnLoaderHookWorker = true) {
304 _shouldSpawnLoaderHookWorker = shouldSpawnLoaderHookWorker;
305 initializeDefaultConditions();
306 // Setup per-realm callbacks that locate data or callbacks that we keep
307 // track of for different ESM modules.
308 setInitializeImportMetaObjectCallback(initializeImportMetaObject);
309 setImportModuleDynamicallyCallback(importModuleDynamicallyCallback);
310}
311
312/**
313 * Determine whether the custom loader worker should be spawned when initializing

Callers 1

initializeModuleLoadersFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…