MCPcopy
hub / github.com/rollup/rollup / includeNode

Method includeNode

src/ast/nodes/ImportExpression.ts:165–180  ·  view source on GitHub ↗
(context: InclusionContext)

Source from the content-addressed store, hash-verified

163 }
164
165 includeNode(context: InclusionContext) {
166 this.included = true;
167 const { localResolution, scope, shouldIncludeDynamicAttributes } = this;
168 if (shouldIncludeDynamicAttributes) {
169 this.options?.includePath(UNKNOWN_PATH, context);
170 }
171 scope.context.includeDynamicImport(this);
172 scope.addAccessedDynamicImport(this);
173 if (localResolution) {
174 if (localResolution.tracked) {
175 localResolution.resolution.includeModuleInExecution();
176 } else {
177 localResolution.resolution.includeAllExports();
178 }
179 }
180 }
181
182 includePath(path: ObjectPath, context: InclusionContext): void {
183 if (!this.included) this.includeNode(context);

Callers 2

includeMethod · 0.95
includePathMethod · 0.95

Calls 5

includeDynamicImportMethod · 0.80
includeAllExportsMethod · 0.80
includePathMethod · 0.65

Tested by

no test coverage detected