* Proxy the dynamic import to the default loader for classic scripts. * @param {string} specifier - The module specifier string. * @param {number} phase - The module import phase. * @param {Record } attributes - The import attributes object. * @param {string|null|undefined} referr
(specifier, phase, attributes, referrerName)
| 223 | * @returns {Promise<import('internal/modules/esm/loader.js').ModuleExports>} - The imported module object. |
| 224 | */ |
| 225 | function defaultImportModuleDynamicallyForScript(specifier, phase, attributes, referrerName) { |
| 226 | const parentURL = normalizeReferrerURL(referrerName); |
| 227 | const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader(); |
| 228 | return cascadedLoader.import(specifier, parentURL, attributes, phase); |
| 229 | } |
| 230 | |
| 231 | /** |
| 232 | * Loads the built-in and wraps it in a ModuleWrap for embedder ESM. |
no test coverage detected
searching dependent graphs…