On this page

Defines the known meta type used by this module.

new ModuleGraph(): ModuleGraph
Returns:ModuleGraph

Defines the known meta type used by this module.

Attributes
ModuleGraphConnection:typeof ModuleGraphConnection
addExplanation(dependency, explanation): void
Attributes
dependency:Dependency
the referencing dependency
explanation:string
an explanation
Returns:void

Adds the provided dependency to the module graph.


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

Adds the provided module to the module graph.


cached(fn, ...args?): R
Attributes
fn:(moduleGraph: ModuleGraph, args: T) => R
computer
args:T
arguments
Returns:R
computed value or cached

Returns computed value or cached.


cloneModuleAttributes(sourceModule, targetModule): void
Attributes
sourceModule:Module
the source module
targetModule:Module
the target module
Returns:void

Clones module attributes.


copyOutgoingModuleConnections(oldModule, newModule, filterConnection): void
Attributes
oldModule:Module
the old referencing module
newModule:Module
the new referencing module
filterConnection:(moduleGraphConnection: ModuleGraphConnection) => boolean
filter predicate for replacement
Returns:void

Copies outgoing module connections.


dependencyCacheProvide(dependency, ...args?): R
Attributes
dependency:D
dependency
args:[ARGS, ...((moduleGraph: ModuleGraph, dependency: D, args: ARGS) => R)[]]
arguments, last argument is a function called with moduleGraph, dependency, ...args
Returns:R
computed value or cached

Dependency cache provide.


finishUpdateParent(): void
Returns:void

Finish update parent.


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

Processes the provided cache stage.


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

Returns the connection.


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

Returns the depth of the module.


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

Returns info about the export.


getExportsInfo(module): ExportsInfo
Attributes
module:Module
the module
Returns:ExportsInfo
info about the exports

Returns info about the exports.


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

Gets incoming connections.


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

Gets incoming connections by origin module.


getIssuer(module): Issuer
Attributes
module:Module
the module
Returns:Issuer
the issuer module

Returns the issuer module.


getMeta(thing): Meta
Attributes
thing:object
any thing
Returns:Meta
metadata

Returns metadata.


getMetaIfExisting(thing): Meta | undefined
Attributes
thing:object
any thing
Returns:Meta | undefined
metadata

Gets meta if existing.


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

Returns the referenced module.


getOptimizationBailout(module): (string | ((requestShortener: RequestShortener) => string))[]
Attributes
module:Module
the module
Returns:(string | ((requestShortener: RequestShortener) => string))[]
optimization bailouts

Gets optimization bailout.


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

Returns the referencing module.


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

Gets outgoing connections.


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

Gets outgoing connections by module.


getParentBlock(dependency): DependenciesBlock | undefined
Attributes
dependency:Dependency
the dependency
parent block

Returns parent block.


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

Gets parent block index.


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

Gets parent module.


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

Gets post order index.


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

Gets pre order index.


getProfile(module): ModuleProfile | undefined
Attributes
module:Module
the module
the module profile

Returns the module profile.


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

Gets provided exports.


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

Gets read only export info.


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

Gets resolved module.


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

Gets resolved origin.


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

Returns the used exports.


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

Checks whether this module graph 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

Checks whether this module graph is deferred.


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.

Checks whether this module graph is export provided.


moveModuleConnections(oldModule, newModule, filterConnection): void
Attributes
oldModule:Module
the old referencing module
newModule:Module
the new referencing module
filterConnection:(moduleGraphConnection: ModuleGraphConnection) => boolean
filter predicate for replacement
Returns:void

Move module connections.


removeAllModuleAttributes(): void
Returns:void

Removes all module attributes.


removeConnection(dependency): void
Attributes
dependency:Dependency
the referencing dependency
Returns:void

Removes connection.


removeModuleAttributes(module): void
Attributes
module:Module
the module
Returns:void

Removes module attributes.


setAsync(module): void
Attributes
module:Module
the module
Returns:void

Updates async using the provided module.


setDepth(module, depth): void
Attributes
module:Module
the module
depth:number
the depth of the module
Returns:void

Updates depth using the provided module.


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

Sets depth if lower.


setIssuer(module, issuer): void
Attributes
module:Module
the module
issuer:Module | null
the issuer module
Returns:void

Updates issuer using the provided module.


setIssuerIfUnset(module, issuer): void
Attributes
module:Module
the module
issuer:Module | null
the issuer module
Returns:void

Sets issuer if unset.


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

Sets module mem caches.


setParentDependenciesBlockIndex(dependency, index): void
Attributes
dependency:Dependency
the dependency
index:number
the index
Returns:void

Sets parent dependencies block index.


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

Updates parents using the provided dependency.


setPostOrderIndex(module, index): void
Attributes
module:Module
the module
index:number
the index of the module
Returns:void

Sets post order index.


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

Sets post order index if unset.


setPreOrderIndex(module, index): void
Attributes
module:Module
the module
index:number
the index of the module
Returns:void

Sets pre order index.


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

Sets pre order index if unset.


setProfile(module, profile?): void
Attributes
module:Module
the module
the module profile
Returns:void

Updates profile using the provided module.


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

Sets resolved module.


unfreeze(): void
Returns:void

Defines the known meta type used by this module.


updateModule(dependency, module): void
Attributes
dependency:Dependency
the referencing dependency
module:Module
the referenced module
Returns:void

Updates module using the provided dependency.


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

Updates parent using the provided dependency.


Attributes
module:Module
the module
Returns:void

Clear module graph for module.


Attributes
module:Module
the module
deprecateMessage:string
message for the deprecation message
deprecationCode:string
code for the deprecation
Returns:ModuleGraph
the module graph

Gets module graph for module.


Attributes
module:Module
the module
moduleGraph:ModuleGraph
the module graph
Returns:void

Sets module graph for module.

Type:undefined | null | Module

Attributes
deferredImportVarMap:Map<Module, string>
importVarMap:Map<Module, string>

Type:KnownMeta & Record<symbol, string[]> & Record<string, any>