On this page

Attributes
new ConstDependency(expression, range, runtimeRequirements?): ConstDependency
Attributes
expression:<string>
the expression
range:
{number|Tuple<number, number>} the source range
runtimeRequirements:<string[]>
runtime requirements
Attributes
category:<string>
disconnect:<any>
expression:<string>
loc:
{DependencyLocation}
module:<any>
optional:<boolean>
range:
{number|Tuple<number, number>}
runtimeRequirements:
{Set }
EXPORTS_OBJECT_REFERENCED:
{string[][]}
NO_EXPORTS_REFERENCED:
{string[][]}
Template:
{ConstDependencyTemplate}
TRANSITIVE:<symbol>
webpack.dependencies.ConstDependency.couldAffectReferencingModule(): boolean | symbol
true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module

webpack.dependencies.ConstDependency.createIgnoredModule(context): Module
Attributes
context:<string>
context directory
Returns:<Module>
ignored module

webpack.dependencies.ConstDependency.deserialize(__namedParameters): void
Attributes
__namedParameters:<ObjectDeserializerContext>
context
Returns:
{void}

webpack.dependencies.ConstDependency.getCondition(moduleGraph): object
Attributes
moduleGraph:<ModuleGraph>
module graph
Returns:<object>
function to determine if the connection is active

webpack.dependencies.ConstDependency.getContext(): string
Returns:<string>
a request context

webpack.dependencies.ConstDependency.getErrors(moduleGraph): WebpackError[]
Attributes
moduleGraph:<ModuleGraph>

Returns errors


webpack.dependencies.ConstDependency.getExports(moduleGraph): ExportsSpec
Attributes
moduleGraph:<ModuleGraph>
Returns:
{ExportsSpec}

Returns the exported names


webpack.dependencies.ConstDependency.getModuleEvaluationSideEffectsState(moduleGraph): ConnectionState
Attributes
moduleGraph:<ModuleGraph>
the module graph
Returns:
{ConnectionState} how this dependency connects the module to referencing modules

webpack.dependencies.ConstDependency.getNumberOfIdOccurrences(): number
Returns:<number>

implement this method to allow the occurrence order plugin to count correctly


webpack.dependencies.ConstDependency.getReference(moduleGraph): never
Stability: 0Deprecated
Attributes
moduleGraph:<ModuleGraph>
Returns:
{never}

Returns the referenced module and export


webpack.dependencies.ConstDependency.getReferencedExports(moduleGraph, runtime): string[]
Attributes
moduleGraph:<ModuleGraph>
runtime:
{RuntimeSpec}
Returns:<string[]>

Returns list of exports referenced by this dependency


webpack.dependencies.ConstDependency.getResourceIdentifier(): string
Returns:<string>
an identifier to merge equal requests

webpack.dependencies.ConstDependency.getWarnings(moduleGraph): WebpackError[]
Attributes
moduleGraph:<ModuleGraph>

Returns warnings


webpack.dependencies.ConstDependency.serialize(__namedParameters): void
Attributes
__namedParameters:<ObjectSerializerContext>
context
Returns:
{void}

webpack.dependencies.ConstDependency.setLoc(startLine, startColumn, endLine, endColumn): void
Attributes
startLine:<number>
start line
startColumn:<number>
start column
endLine:<number>
end line
endColumn:<number>
end column
Returns:
{void}

webpack.dependencies.ConstDependency.updateHash(hash, context): void
  • hash {Hash} hash to be updated
  • context {UpdateHashContextDependency} context
  • Returns: {void}

Update the hash


webpack.dependencies.ConstDependency.isLowPriorityDependency(dependency): boolean
Attributes
dependency:<Dependency>
dep
Returns:<boolean>
true if the dependency is a low priority dependency