MCPcopy
hub / github.com/webpack/webpack / link

Method link

test/harness/runner/index.js:681–704  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

679 return Promise.resolve(esm);
680
681 const link = async () => {
682 await esm.link(
683 async (specifier, referencingModule) =>
684 // `linker` should return `vm.SourceTextModule`
685 await asModule(
686 await this.require(
687 path.dirname(
688 referencingModule.identifier ||
689 fileURLToPath(
690 /** @type {string} */ (
691 /** @type {EXPECTED_ANY} */ (referencingModule).url
692 )
693 )
694 ),
695 specifier,
696 { esmReturnStatus: ESModuleStatus.Unlinked }
697 ),
698 referencingModule.context,
699 {
700 esmReturnStatus: ESModuleStatus.Unlinked
701 }
702 )
703 );
704 };
705
706 const run = async () => {
707 // Link module dependencies

Callers 3

runModuleFunction · 0.80
asModule.jsFile · 0.80

Calls 1

requireMethod · 0.95

Tested by

no test coverage detected