On this page

class webpack.AsyncDependenciesBlock extends DependenciesBlock

DependenciesBlock is the base class for all Module classes in webpack. It describes a "block" of dependencies which are pointers to other DependenciesBlock instances. For example when a Module has a CommonJs require statement, the DependencyBlock for the CommonJs module would be added as a dependency to the Module. DependenciesBlock is inherited by two types of classes: Module subclasses and AsyncDependenciesBlock subclasses. The only difference between the two is that AsyncDependenciesBlock subclasses are used for code-splitting (async boundary) and Module subclasses are not.

new AsyncDependenciesBlock(groupOptions, loc?, request?): AsyncDependenciesBlock
Attributes
options for the group
request:string | null
the request
Attributes
chunkName:string | null
circular:boolean
dependencies:Dependency[]
module:any
request:string | null
addBlock(block): void
Attributes

Adds a DependencyBlock to DependencyBlock relationship. This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)


addDependency(dependency): void
Attributes
dependency:Dependency
Returns:void

Adds the provided dependency to the dependencies block.


clearDependenciesAndBlocks(): void
Returns:void

Clear dependencies and blocks.


deserialize(objectDeserializerContextObjectMiddlewareObject_4): void
Attributes
objectDeserializerContextObjectMiddlewareObject_4:ObjectDeserializerContextObjectMiddlewareObject_4
Returns:void

Restores this instance from the provided deserializer context.


getRootBlock(): DependenciesBlock

removeDependency(dependency): void
Attributes
dependency:Dependency
Returns:void

Removes dependency.


serialize(objectSerializerContextObjectMiddlewareObject_5): void
Attributes
objectSerializerContextObjectMiddlewareObject_5:ObjectSerializerContextObjectMiddlewareObject_5
Returns:void

Serializes this instance into the provided serializer context.


updateHash(hash, context): void
Attributes
hash:Hash
the hash used to track dependencies
Returns:void

Updates the hash with the data contributed by this instance.

Type:RawChunkGroupOptions & { name?: null | string } & { entryOptions?: EntryOptions } & { circular?: boolean }
Attributes
name:null | string
Attributes
entryOptions:EntryOptions
Attributes
circular:boolean