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

Function importModuleDynamically

lib/internal/process/execution.js:415–419  ·  view source on GitHub ↗
(specifier, _, importAttributes, phase)

Source from the content-addressed store, hash-verified

413function compileScript(name, body, baseUrl) {
414 const hostDefinedOptionId = Symbol(name);
415 async function importModuleDynamically(specifier, _, importAttributes, phase) {
416 const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader();
417 return cascadedLoader.import(specifier, baseUrl, importAttributes,
418 phase === 'source' ? kSourcePhase : kEvaluationPhase);
419 }
420 return makeContextifyScript(
421 body, // code
422 name, // filename,

Callers 1

Calls 2

importMethod · 0.80
requireFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…