On this page

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

webpack.ModuleGraph.addExtraReason(module, explanation): void
  • 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
  • sourceModule {Module} the source module
  • targetModule {Module} the target module
  • Returns: {void}

webpack.ModuleGraph.copyOutgoingModuleConnections(oldModule, newModule, filterConnection): void
  • 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): void
  • dependency {Dependency} the dependency to look for a referenced module
  • Returns: {ModuleGraphConnection} the connection

webpack.ModuleGraph.getDepth(module): void
  • module {Module} the module
  • Returns: <number> the depth of the module

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

webpack.ModuleGraph.getExportsInfo(module): void
  • module {Module} the module
  • Returns: {ExportsInfo} info about the exports

webpack.ModuleGraph.getIncomingConnections(module): void
  • module {Module} the module
  • Returns: {Iterable} reasons why a module is included

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

webpack.ModuleGraph.getIssuer(module): void
  • 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): void
  • dependency {Dependency} the dependency to look for a referenced module
  • Returns: {Module} the referenced module

webpack.ModuleGraph.getOptimizationBailout(module): void

webpack.ModuleGraph.getOrigin(dependency): void
  • dependency {Dependency} the dependency to look for a referencing module
  • Returns: {Module} the referencing module

webpack.ModuleGraph.getOutgoingConnections(module): void
  • module {Module} the module
  • Returns: {Iterable} list of outgoing connections

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

webpack.ModuleGraph.getParentBlock(dependency): void
  • dependency {Dependency} the dependency
  • Returns: {DependenciesBlock} parent block

webpack.ModuleGraph.getParentBlockIndex(dependency): void
  • dependency {Dependency} the dependency
  • Returns: <number> index

webpack.ModuleGraph.getParentModule(dependency): void
  • dependency {Dependency} the dependency
  • Returns: {Module} parent module

webpack.ModuleGraph.getPostOrderIndex(module): void
  • module {Module} the module
  • Returns: <number> the index of the module

webpack.ModuleGraph.getPreOrderIndex(module): void
  • module {Module} the module
  • Returns: <number> the index of the module

webpack.ModuleGraph.getProfile(module): void
  • module {Module} the module
  • Returns: {ModuleProfile} the module profile

webpack.ModuleGraph.getProvidedExports(module): void
  • module {Module} the module
  • Returns: <string[]> the provided exports

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

webpack.ModuleGraph.getResolvedModule(dependency): void
  • dependency {Dependency} the dependency to look for a referenced module
  • Returns: {Module} the referenced module

webpack.ModuleGraph.getResolvedOrigin(dependency): void
  • dependency {Dependency} the dependency to look for a referencing module
  • Returns: {Module} the original referencing module

webpack.ModuleGraph.getUsedExports(module, runtime): void
  • 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): void
  • module {Module} the module
  • Returns: <boolean> true, if the module is async

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

webpack.ModuleGraph.isExportProvided(module, exportName): void
  • 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
  • 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
  • dependency {Dependency} the referencing dependency
  • Returns: {void}

webpack.ModuleGraph.removeModuleAttributes(module): void
  • module {Module} the module
  • Returns: {void}

webpack.ModuleGraph.setAsync(module): void
  • module {Module} the module
  • Returns: {void}

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

webpack.ModuleGraph.setDepthIfLower(module, depth): void
  • 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
  • module {Module} the module
  • issuer {Module} the issuer module
  • Returns: {void}

webpack.ModuleGraph.setIssuerIfUnset(module, issuer): void
  • 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
  • dependency {Dependency} the dependency
  • index <number> the index
  • Returns: {void}

webpack.ModuleGraph.setParents(dependency, block, module, indexInBlock?): void
  • 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
  • module {Module} the module
  • index <number> the index of the module
  • Returns: {void}

webpack.ModuleGraph.setPostOrderIndexIfUnset(module, index): void
  • 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
  • module {Module} the module
  • index <number> the index of the module
  • Returns: {void}

webpack.ModuleGraph.setPreOrderIndexIfUnset(module, index): void
  • 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
  • module {Module} the module
  • profile {ModuleProfile} the module profile
  • Returns: {void}

webpack.ModuleGraph.setResolvedModule(originModule, dependency, module): void
  • 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
  • dependency {Dependency} the referencing dependency
  • module {Module} the referenced module
  • Returns: {void}

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

webpack.ModuleGraph.clearModuleGraphForModule(module): void
  • module {Module} the module
  • Returns: {void}

webpack.ModuleGraph.getModuleGraphForModule(module, deprecateMessage, deprecationCode): void
  • module {Module} the module
  • deprecateMessage <string> message for the deprecation message
  • deprecationCode <string> code for the deprecation
  • Returns: {ModuleGraph} the module graph

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