Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(types): Add docs for compilation.afterChunks hook #17202

Merged
merged 1 commit into from May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/Compilation.js
Expand Up @@ -647,7 +647,12 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si

/** @type {SyncHook<[]>} */
beforeChunks: new SyncHook([]),
/** @type {SyncHook<[Iterable<Chunk>]>} */
/**
* The `afterChunks` hook is called directly after the chunks and module graph have
* been created and before the chunks and modules have been optimized. This hook is useful to
* inspect, analyze, and/or modify the chunk graph.
* @type {SyncHook<[Iterable<Chunk>]>}
*/
afterChunks: new SyncHook(["chunks"]),

/** @type {SyncBailHook<[Iterable<Module>]>} */
Expand Down
5 changes: 5 additions & 0 deletions types.d.ts
Expand Up @@ -1452,6 +1452,11 @@ declare class Compilation {
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
/**
* The `afterChunks` hook is called directly after the chunks and module graph have
* been created and before the chunks and modules have been optimized. This hook is useful to
* inspect, analyze, and/or modify the chunk graph.
*/
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
Expand Down