On this page

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

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

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

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

webpack.ModuleGraph.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}

webpack.ModuleGraph.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

webpack.ModuleGraph.finishUpdateParent(): void
Returns:
{void}

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

webpack.ModuleGraph.getConnection(dependency): ModuleGraphConnection
Attributes
dependency:<Dependency>
the dependency to look for a referenced module
the connection

webpack.ModuleGraph.getDepth(module): number
Attributes
module:<Module>
the module
Returns:<number>
the depth of the module

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

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

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

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

webpack.ModuleGraph.getIssuer(module): Module
Attributes
module:<Module>
the module
Returns:<Module>
the issuer module

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

webpack.ModuleGraph.getMetaIfExisting(thing): Meta
Attributes
thing:<object>
any thing
Returns:
{Meta} metadata

webpack.ModuleGraph.getModule(dependency): Module
Attributes
dependency:<Dependency>
the dependency to look for a referenced module
Returns:<Module>
the referenced module

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

webpack.ModuleGraph.getOrigin(dependency): Module
Attributes
dependency:<Dependency>
the dependency to look for a referencing module
Returns:<Module>
the referencing module

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

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

webpack.ModuleGraph.getParentBlock(dependency): DependenciesBlock
Attributes
dependency:<Dependency>
the dependency
Returns:
{DependenciesBlock} parent block

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

webpack.ModuleGraph.getParentModule(dependency): Module
Attributes
dependency:<Dependency>
the dependency
Returns:<Module>
parent module

webpack.ModuleGraph.getPostOrderIndex(module): number
Attributes
module:<Module>
the module
Returns:<number>
the index of the module

webpack.ModuleGraph.getPreOrderIndex(module): number
Attributes
module:<Module>
the module
Returns:<number>
the index of the module

webpack.ModuleGraph.getProfile(module): ModuleProfile
Attributes
module:<Module>
the module
Returns:
{ModuleProfile} the module profile

webpack.ModuleGraph.getProvidedExports(module): string[]
Attributes
module:<Module>
the module
Returns:<string[]>
the provided exports

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

webpack.ModuleGraph.getResolvedModule(dependency): Module
Attributes
dependency:<Dependency>
the dependency to look for a referenced module
Returns:<Module>
the referenced module

webpack.ModuleGraph.getResolvedOrigin(dependency): Module
Attributes
dependency:<Dependency>
the dependency to look for a referencing module
Returns:<Module>
the original referencing module

webpack.ModuleGraph.getUsedExports(module, runtime): boolean | SortableSet<string>
Attributes
module:<Module>
the module
runtime:
{RuntimeSpec} the runtime
Returns:
{boolean|SortableSet } 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.

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

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

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

webpack.ModuleGraph.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}

webpack.ModuleGraph.removeAllModuleAttributes(): void
Returns:
{void}

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

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

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

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

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

webpack.ModuleGraph.setIssuer(module, issuer): void
Attributes
module:<Module>
the module
issuer:<Module>
the issuer module
Returns:
{void}

webpack.ModuleGraph.setIssuerIfUnset(module, issuer): void
Attributes
module:<Module>
the module
issuer:<Module>
the issuer module
Returns:
{void}

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

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

webpack.ModuleGraph.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}

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

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

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

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

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

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

webpack.ModuleGraph.unfreeze(): void
Returns:
{void}

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

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

webpack.ModuleGraph.clearModuleGraphForModule(module): void
Attributes
module:<Module>
the module
Returns:
{void}

webpack.ModuleGraph.getModuleGraphForModule(module, deprecateMessage, deprecationCode): ModuleGraph
Attributes
module:<Module>
the module
deprecateMessage:<string>
message for the deprecation message
deprecationCode:<string>
code for the deprecation
the module graph

webpack.ModuleGraph.setModuleGraphForModule(module, moduleGraph): void
Attributes
module:<Module>
the module
moduleGraph:<ModuleGraph>
the module graph
Returns:
{void}