On this page

  • {NullDependency}
new ConstDependency(expression, range, runtimeRequirements?): ConstDependency
Attributes
expression:<string>
the expression
range:
{number|Tuple<number, number>} the source range
runtimeRequirements:<string[]>
runtime requirements
Returns:
{ConstDependency}
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
  • __namedParameters {ObjectDeserializerContext} context
  • Returns: {void}

webpack.dependencies.ConstDependency.getCondition(moduleGraph): void
  • 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): void
  • moduleGraph {ModuleGraph}
  • Returns: {WebpackError[]}

Returns errors


webpack.dependencies.ConstDependency.getExports(moduleGraph): void
  • moduleGraph {ModuleGraph}
  • Returns: {ExportsSpec}

Returns the exported names


webpack.dependencies.ConstDependency.getModuleEvaluationSideEffectsState(moduleGraph): void
  • 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): void
Stability: 0Deprecated
  • moduleGraph {ModuleGraph}
  • Returns: {never}

Returns the referenced module and export


webpack.dependencies.ConstDependency.getReferencedExports(moduleGraph, runtime): void
  • 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): void
  • moduleGraph {ModuleGraph}
  • Returns: {WebpackError[]}

Returns warnings


webpack.dependencies.ConstDependency.serialize(__namedParameters): void
  • __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): void
  • dependency {Dependency} dep
  • Returns: <boolean> true if the dependency is a low priority dependency