On this page

class AsyncDependenciesBlock extends DependenciesBlock
Source Code: lib/AsyncDependenciesBlock.js#L21

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
Source Code: lib/AsyncDependenciesBlock.js#L27
Attributes
Source Code: lib/DependenciesBlock.js#L32
Source Code: lib/AsyncDependenciesBlock.js#L51
Type:string | null
Source Code: lib/DependenciesBlock.js#L30
Type:Dependency[]
Source Code: lib/AsyncDependenciesBlock.js#L39
Source Code: lib/AsyncDependenciesBlock.js#L41
Type:any
Source Code: lib/DependenciesBlock.js#L34
Source Code: lib/AsyncDependenciesBlock.js#L43
Type:string | null
Source Code: lib/AsyncDependenciesBlock.js#L69
Type:boolean
asyncDependenciesBlock.addBlock(block): void
Source Code: lib/DependenciesBlock.js#L50
Attributes

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

asyncDependenciesBlock.addDependency(dependency): void
Source Code: lib/DependenciesBlock.js#L61
Attributes
dependency:Dependency

Adds the provided dependency to the dependencies block.

asyncDependenciesBlock.clearDependenciesAndBlocks(): void
Source Code: lib/DependenciesBlock.js#L81

Clear dependencies and blocks.

asyncDependenciesBlock.deserialize(__namedParameters): void
Source Code: lib/DependenciesBlock.js#L114
Attributes

Restores this instance from the provided deserializer context.

asyncDependenciesBlock.getRootBlock(): DependenciesBlock
Source Code: lib/DependenciesBlock.js#L37
asyncDependenciesBlock.removeDependency(dependency): void
Source Code: lib/DependenciesBlock.js#L70
Attributes
dependency:Dependency

Removes dependency.

asyncDependenciesBlock.serialize(__namedParameters): void
Source Code: lib/DependenciesBlock.js#L105
Attributes

Serializes this instance into the provided serializer context.

asyncDependenciesBlock.updateHash(hash, context): void
Source Code: lib/DependenciesBlock.js#L92
Attributes

Updates the hash with the data contributed by this instance.