MCPcopy
hub / github.com/rollup/rollup / includeVariable

Method includeVariable

src/Module.ts:1422–1442  ·  view source on GitHub ↗
(variable: Variable, path: ObjectPath, context: InclusionContext)

Source from the content-addressed store, hash-verified

1420 }
1421
1422 private includeVariable(variable: Variable, path: ObjectPath, context: InclusionContext): void {
1423 const { included, module: variableModule } = variable;
1424 variable.includePath(path, context);
1425 if (included) {
1426 if (variableModule instanceof Module && variableModule !== this) {
1427 getAndExtendSideEffectModules(variable, this);
1428 }
1429 return;
1430 }
1431 this.graph.needsTreeshakingPass = true;
1432 if (!(variableModule instanceof Module)) {
1433 return;
1434 }
1435 variableModule.includeModuleInExecution();
1436 if (variableModule !== this) {
1437 const sideEffectModules = getAndExtendSideEffectModules(variable, this);
1438 for (const module of sideEffectModules) {
1439 module.includeModuleInExecution();
1440 }
1441 }
1442 }
1443
1444 private includeVariableInModule(
1445 variable: Variable,

Callers 2

includeAllExportsMethod · 0.95

Calls 3

includePathMethod · 0.65

Tested by

no test coverage detected