new ModuleGraph(): ModuleGraphReturns:
{ModuleGraph}
ModuleGraphConnection{ModuleGraphConnection}
webpack.ModuleGraph.addExplanation(dependency, explanation): voiddependency{Dependency} the referencing dependencyexplanation<string>an explanation- Returns: {void}
webpack.ModuleGraph.addExtraReason(module, explanation): voidmodule{Module} the referenced moduleexplanation<string>an explanation why it's referenced- Returns: {void}
webpack.ModuleGraph.cached(fn, ...args?): RAttributes
fn:
<object>computer
args:
{T} arguments
Returns:
{R} computed value or cached
webpack.ModuleGraph.cloneModuleAttributes(sourceModule, targetModule): voidsourceModule{Module} the source moduletargetModule{Module} the target module- Returns: {void}
webpack.ModuleGraph.copyOutgoingModuleConnections(oldModule, newModule, filterConnection): voidoldModule{Module} the old referencing modulenewModule{Module} the new referencing modulefilterConnection<object>filter predicate for replacement- Returns: {void}
webpack.ModuleGraph.dependencyCacheProvide(dependency, ...args?): voiddependency{D} dependencyargs{Tuple<ARGS, unknown>} arguments, last argument is a function called with moduleGraph, dependency, ...args- Returns: {R} computed value or cached
webpack.ModuleGraph.finishUpdateParent(): voidReturns:
{void}
webpack.ModuleGraph.freeze(cacheStage?): voidAttributes
cacheStage:
<string>a persistent stage name for caching
Returns:
{void}
webpack.ModuleGraph.getConnection(dependency): voiddependency{Dependency} the dependency to look for a referenced module- Returns: {ModuleGraphConnection} the connection
webpack.ModuleGraph.getDepth(module): voidmodule{Module} the module- Returns:
<number>the depth of the module
webpack.ModuleGraph.getExportInfo(module, exportName): voidmodule{Module} the moduleexportName<string>the export- Returns: {ExportInfo} info about the export
webpack.ModuleGraph.getExportsInfo(module): voidmodule{Module} the module- Returns: {ExportsInfo} info about the exports
webpack.ModuleGraph.getIncomingConnections(module): voidmodule{Module} the module- Returns: {Iterable
} reasons why a module is included
webpack.ModuleGraph.getIncomingConnectionsByOriginModule(module): voidmodule{Module} the module- Returns: {ReadonlyMap<Module, ModuleGraphConnection[]>} reasons why a module is included, in a map by source module
webpack.ModuleGraph.getIssuer(module): voidmodule{Module} the module- Returns: {Module} the issuer module
webpack.ModuleGraph.getMeta(thing): MetaAttributes
thing:
<object>any thing
Returns:
{Meta} metadata
webpack.ModuleGraph.getMetaIfExisting(thing): MetaAttributes
thing:
<object>any thing
Returns:
{Meta} metadata
webpack.ModuleGraph.getModule(dependency): voiddependency{Dependency} the dependency to look for a referenced module- Returns: {Module} the referenced module
webpack.ModuleGraph.getOptimizationBailout(module): voidmodule{Module} the module- Returns:
<string>|<object[]>optimization bailouts
webpack.ModuleGraph.getOrigin(dependency): voiddependency{Dependency} the dependency to look for a referencing module- Returns: {Module} the referencing module
webpack.ModuleGraph.getOutgoingConnections(module): voidmodule{Module} the module- Returns: {Iterable
} list of outgoing connections
webpack.ModuleGraph.getOutgoingConnectionsByModule(module): voidmodule{Module} the module- Returns: {ReadonlyMap<Module, ModuleGraphConnection[]>} connections to modules, in a map by module
webpack.ModuleGraph.getParentBlock(dependency): voiddependency{Dependency} the dependency- Returns: {DependenciesBlock} parent block
webpack.ModuleGraph.getParentBlockIndex(dependency): voiddependency{Dependency} the dependency- Returns:
<number>index
webpack.ModuleGraph.getParentModule(dependency): voiddependency{Dependency} the dependency- Returns: {Module} parent module
webpack.ModuleGraph.getPostOrderIndex(module): voidmodule{Module} the module- Returns:
<number>the index of the module
webpack.ModuleGraph.getPreOrderIndex(module): voidmodule{Module} the module- Returns:
<number>the index of the module
webpack.ModuleGraph.getProfile(module): voidmodule{Module} the module- Returns: {ModuleProfile} the module profile
webpack.ModuleGraph.getProvidedExports(module): voidmodule{Module} the module- Returns:
<string[]>the provided exports
webpack.ModuleGraph.getReadOnlyExportInfo(module, exportName): voidmodule{Module} the moduleexportName<string>the export- Returns: {ExportInfo} info about the export (do not modify)
webpack.ModuleGraph.getResolvedModule(dependency): voiddependency{Dependency} the dependency to look for a referenced module- Returns: {Module} the referenced module
webpack.ModuleGraph.getResolvedOrigin(dependency): voiddependency{Dependency} the dependency to look for a referencing module- Returns: {Module} the original referencing module
webpack.ModuleGraph.getUsedExports(module, runtime): voidmodule{Module} the moduleruntime{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): voidmodule{Module} the module- Returns:
<boolean>true, if the module is async
webpack.ModuleGraph.isDeferred(module): voidmodule{Module} the module- Returns:
<boolean>true, if the module is used as a deferred module at least once
webpack.ModuleGraph.isExportProvided(module, exportName): voidmodule{Module} the moduleexportName<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): voidoldModule{Module} the old referencing modulenewModule{Module} the new referencing modulefilterConnection<object>filter predicate for replacement- Returns: {void}
webpack.ModuleGraph.removeAllModuleAttributes(): voidReturns:
{void}
webpack.ModuleGraph.removeConnection(dependency): voiddependency{Dependency} the referencing dependency- Returns: {void}
webpack.ModuleGraph.removeModuleAttributes(module): voidmodule{Module} the module- Returns: {void}
webpack.ModuleGraph.setAsync(module): voidmodule{Module} the module- Returns: {void}
webpack.ModuleGraph.setDepth(module, depth): voidmodule{Module} the moduledepth<number>the depth of the module- Returns: {void}
webpack.ModuleGraph.setDepthIfLower(module, depth): voidmodule{Module} the moduledepth<number>the depth of the module- Returns:
<boolean>true, if the depth was set
webpack.ModuleGraph.setIssuer(module, issuer): voidmodule{Module} the moduleissuer{Module} the issuer module- Returns: {void}
webpack.ModuleGraph.setIssuerIfUnset(module, issuer): voidmodule{Module} the moduleissuer{Module} the issuer module- Returns: {void}
webpack.ModuleGraph.setModuleMemCaches(moduleMemCaches): voidmoduleMemCaches{Map<Module, WeakTupleMap<any[], any>>} mem caches for modules for better caching- Returns: {void}
webpack.ModuleGraph.setParentDependenciesBlockIndex(dependency, index): voiddependency{Dependency} the dependencyindex<number>the index- Returns: {void}
webpack.ModuleGraph.setParents(dependency, block, module, indexInBlock?): voiddependency{Dependency} the dependencyblock{DependenciesBlock} parent blockmodule{Module} parent moduleindexInBlock<number>position in block- Returns: {void}
webpack.ModuleGraph.setPostOrderIndex(module, index): voidmodule{Module} the moduleindex<number>the index of the module- Returns: {void}
webpack.ModuleGraph.setPostOrderIndexIfUnset(module, index): voidmodule{Module} the moduleindex<number>the index of the module- Returns:
<boolean>true, if the index was set
webpack.ModuleGraph.setPreOrderIndex(module, index): voidmodule{Module} the moduleindex<number>the index of the module- Returns: {void}
webpack.ModuleGraph.setPreOrderIndexIfUnset(module, index): voidmodule{Module} the moduleindex<number>the index of the module- Returns:
<boolean>true, if the index was set
webpack.ModuleGraph.setProfile(module, profile?): voidmodule{Module} the moduleprofile{ModuleProfile} the module profile- Returns: {void}
webpack.ModuleGraph.setResolvedModule(originModule, dependency, module): voidoriginModule{Module} the referencing moduledependency{Dependency} the referencing dependencymodule{Module} the referenced module- Returns: {void}
webpack.ModuleGraph.unfreeze(): voidReturns:
{void}
webpack.ModuleGraph.updateModule(dependency, module): voiddependency{Dependency} the referencing dependencymodule{Module} the referenced module- Returns: {void}
webpack.ModuleGraph.updateParent(dependency, connection?, parentModule?): voiddependency{Dependency} the need update dependencyconnection{ModuleGraphConnection} the target connectionparentModule{Module} the parent module- Returns: {void}
webpack.ModuleGraph.clearModuleGraphForModule(module): voidmodule{Module} the module- Returns: {void}
webpack.ModuleGraph.getModuleGraphForModule(module, deprecateMessage, deprecationCode): voidmodule{Module} the moduledeprecateMessage<string>message for the deprecation messagedeprecationCode<string>code for the deprecation- Returns: {ModuleGraph} the module graph
webpack.ModuleGraph.setModuleGraphForModule(module, moduleGraph): voidmodule{Module} the modulemoduleGraph{ModuleGraph} the module graph- Returns: {void}