MCPcopy Index your code
hub / github.com/rollup/rollup / includeAndGetAdditionalMergedNamespaces

Method includeAndGetAdditionalMergedNamespaces

src/Module.ts:1387–1406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1385 }
1386
1387 includeAndGetAdditionalMergedNamespaces(): Variable[] {
1388 const externalNamespaces = new Set<Variable>();
1389 const syntheticNamespaces = new Set<Variable>();
1390 for (const module of [this, ...this.exportAllModules]) {
1391 if (module instanceof ExternalModule) {
1392 const [externalVariable] = module.getVariableForExportName('*', {
1393 importChain: [this.id]
1394 });
1395 externalVariable.includePath(UNKNOWN_PATH, createInclusionContext());
1396 this.includedImports.add(externalVariable);
1397 externalNamespaces.add(externalVariable);
1398 } else if (module.info.syntheticNamedExports) {
1399 const syntheticNamespace = module.getSyntheticNamespace();
1400 syntheticNamespace.includePath(UNKNOWN_PATH, createInclusionContext());
1401 this.includedImports.add(syntheticNamespace);
1402 syntheticNamespaces.add(syntheticNamespace);
1403 }
1404 }
1405 return [...syntheticNamespaces, ...externalNamespaces];
1406 }
1407
1408 private includeDynamicImport(node: ImportExpression): void {
1409 const { resolution } = node;

Callers 1

Calls 5

createInclusionContextFunction · 0.90
addMethod · 0.80
getSyntheticNamespaceMethod · 0.80
includePathMethod · 0.65

Tested by

no test coverage detected