On this page

new ModuleGraph(): ModuleGraph
Attributes
ModuleGraphConnection:<ModuleGraphConnection>
addExplanation(dependency, explanation): void
Attributes
dependency:<Dependency>
the referencing dependency
explanation:<string>
an explanation
Returns:
{void}

addExtraReason(module, explanation): void
Attributes
module:<Module>
the referenced module
explanation:<string>
an explanation why it's referenced
Returns:
{void}

cached(fn, ...args): R
Attributes
computer
args:
{T} arguments
Returns:
{R} computed value or cached

cloneModuleAttributes(sourceModule, targetModule): void
Attributes
sourceModule:<Module>
the source module
targetModule:<Module>
the target module
Returns:
{void}

copyOutgoingModuleConnections(oldModule, newModule, filterConnection): void
Attributes
oldModule:<Module>
the old referencing module
newModule:<Module>
the new referencing module
filterConnection:<object>
filter predicate for replacement
Returns:
{void}

dependencyCacheProvide(dependency, ...args): void
  • dependency {D} dependency
  • args {Tuple<ARGS, unknown>} arguments, last argument is a function called with moduleGraph, dependency, ...args
  • Returns: {R} computed value or cached

finishUpdateParent(): void
Returns:
{void}

freeze(cacheStage?): void
Attributes
cacheStage:<string>
a persistent stage name for caching
Returns:
{void}

getConnection(dependency): ModuleGraphConnection | undefined
Attributes
dependency:<Dependency>
the dependency to look for a referenced module
the connection

getDepth(module): number | null
Attributes
module:<Module>
the module
Returns:<number> | <null>
the depth of the module

getExportInfo(module, exportName): ExportInfo
Attributes
module:<Module>
the module
exportName:<string>
the export
Returns:
{ExportInfo} info about the export

getExportsInfo(module): ExportsInfo
Attributes
module:<Module>
the module
Returns:
{ExportsInfo} info about the exports

getIncomingConnections(module): Iterable<ModuleGraphConnection>
Attributes
module:<Module>
the module
Returns:
{Iterable } reasons why a module is included

getIncomingConnectionsByOriginModule(module): ReadonlyMap<Module | null | undefined, ModuleGraphConnection[]>
Attributes
module:<Module>
the module
Returns:
{ReadonlyMap<Module|null|undefined, ModuleGraphConnection[]>} reasons why a module is included, in a map by source module

getIssuer(module): Issuer
Attributes
module:<Module>
the module
Returns:
{Issuer} the issuer module

getMeta(thing): Meta
Attributes
thing:<object>
any thing
Returns:
{Meta} metadata

getMetaIfExisting(thing): undefined
Attributes
thing:<object>
any thing
Returns:<undefined>
metadata

getModule(dependency): Module | null
Attributes
dependency:<Dependency>
the dependency to look for a referenced module
Returns:<Module> | <null>
the referenced module

getOptimizationBailout(module): string | object[]
Attributes
module:<Module>
the module
optimization bailouts

getOrigin(dependency): Module | null
Attributes
dependency:<Dependency>
the dependency to look for a referencing module
Returns:<Module> | <null>
the referencing module

getOutgoingConnections(module): Iterable<ModuleGraphConnection>
Attributes
module:<Module>
the module
Returns:
{Iterable } list of outgoing connections

getOutgoingConnectionsByModule(module): ReadonlyMap<Module | undefined, ModuleGraphConnection[]> | undefined
Attributes
module:<Module>
the module
Returns:
{ReadonlyMap<Module|undefined, ModuleGraphConnection[]>|undefined} connections to modules, in a map by module

getParentBlock(dependency): undefined
Attributes
dependency:<Dependency>
the dependency
Returns:<undefined>
parent block

getParentBlockIndex(dependency): number
Attributes
dependency:<Dependency>
the dependency
Returns:<number>
index

getParentModule(dependency): Module | undefined
Attributes
dependency:<Dependency>
the dependency
parent module

getPostOrderIndex(module): number | null
Attributes
module:<Module>
the module
Returns:<number> | <null>
the index of the module

getPreOrderIndex(module): number | null
Attributes
module:<Module>
the module
Returns:<number> | <null>
the index of the module

getProfile(module): undefined
Attributes
module:<Module>
the module
Returns:<undefined>
the module profile

getProvidedExports(module): string[] | null
Attributes
module:<Module>
the module
Returns:<string[]> | <null>
the provided exports

getReadOnlyExportInfo(module, exportName): ExportInfo
Attributes
module:<Module>
the module
exportName:<string>
the export
Returns:
{ExportInfo} info about the export (do not modify)

getResolvedModule(dependency): Module | null
Attributes
dependency:<Dependency>
the dependency to look for a referenced module
Returns:<Module> | <null>
the referenced module

getResolvedOrigin(dependency): Module | null
Attributes
dependency:<Dependency>
the dependency to look for a referencing module
Returns:<Module> | <null>
the original referencing module

getUsedExports(module, runtime): boolean | SortableSet<string> | null
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
Returns:
{boolean|SortableSet |null} the used exports false: module is not used at all. true: the module namespace/object export is used. SortableSet : these export names are used. empty SortableSet : module is used but no export. null: unknown, worst case should be assumed.

isAsync(module): boolean
Attributes
module:<Module>
the module
Returns:<boolean>
true, if the module is async

isDeferred(module): boolean
Attributes
module:<Module>
the module
Returns:<boolean>
true, if the module is used as a deferred module at least once

isExportProvided(module, exportName): boolean | null
Attributes
module:<Module>
the module
exportName:<string> | <string[]>
a name of an export
Returns:<boolean> | <null>
true, if the export is provided by the module. null, if it's unknown. false, if it's not provided.

moveModuleConnections(oldModule, newModule, filterConnection): void
Attributes
oldModule:<Module>
the old referencing module
newModule:<Module>
the new referencing module
filterConnection:<object>
filter predicate for replacement
Returns:
{void}

removeAllModuleAttributes(): void
Returns:
{void}

removeConnection(dependency): void
Attributes
dependency:<Dependency>
the referencing dependency
Returns:
{void}

removeModuleAttributes(module): void
Attributes
module:<Module>
the module
Returns:
{void}

setAsync(module): void
Attributes
module:<Module>
the module
Returns:
{void}

setDepth(module, depth): void
Attributes
module:<Module>
the module
depth:<number>
the depth of the module
Returns:
{void}

setDepthIfLower(module, depth): boolean
Attributes
module:<Module>
the module
depth:<number>
the depth of the module
Returns:<boolean>
true, if the depth was set

setIssuer(module, issuer): void
Attributes
module:<Module>
the module
issuer:<Module> | <null>
the issuer module
Returns:
{void}

setIssuerIfUnset(module, issuer): void
Attributes
module:<Module>
the module
issuer:<Module> | <null>
the issuer module
Returns:
{void}

setModuleMemCaches(moduleMemCaches): void
  • moduleMemCaches {Map<Module, WeakTupleMap<any[], any>>} mem caches for modules for better caching
  • Returns: {void}

setParentDependenciesBlockIndex(dependency, index): void
Attributes
dependency:<Dependency>
the dependency
index:<number>
the index
Returns:
{void}

setParents(dependency, block, module, indexInBlock?): void
Attributes
dependency:<Dependency>
the dependency
block:
{DependenciesBlock} parent block
module:<Module>
parent module
indexInBlock:<number>
position in block
Returns:
{void}

setPostOrderIndex(module, index): void
Attributes
module:<Module>
the module
index:<number>
the index of the module
Returns:
{void}

setPostOrderIndexIfUnset(module, index): boolean
Attributes
module:<Module>
the module
index:<number>
the index of the module
Returns:<boolean>
true, if the index was set

setPreOrderIndex(module, index): void
Attributes
module:<Module>
the module
index:<number>
the index of the module
Returns:
{void}

setPreOrderIndexIfUnset(module, index): boolean
Attributes
module:<Module>
the module
index:<number>
the index of the module
Returns:<boolean>
true, if the index was set

setProfile(module, profile?): void
Attributes
module:<Module>
the module
profile:
{ModuleProfile} the module profile
Returns:
{void}

setResolvedModule(originModule, dependency, module): void
Attributes
originModule:<Module> | <null>
the referencing module
dependency:<Dependency>
the referencing dependency
module:<Module>
the referenced module
Returns:
{void}

unfreeze(): void
Returns:
{void}

updateModule(dependency, module): void
Attributes
dependency:<Dependency>
the referencing dependency
module:<Module>
the referenced module
Returns:
{void}

updateParent(dependency, connection?, parentModule?): void
Attributes
dependency:<Dependency>
the need update dependency
the target connection
parentModule:<Module>
the parent module
Returns:
{void}

Attributes
module:<Module>
the module
Returns:
{void}

Attributes
module:<Module>
the module
deprecateMessage:<string>
message for the deprecation message
deprecationCode:<string>
code for the deprecation
the module graph

Attributes
module:<Module>
the module
moduleGraph:<ModuleGraph>
the module graph
Returns:
{void}