diff --git a/src/content/api/compilation-hooks.mdx b/src/content/api/compilation-hooks.mdx index c9fcef5af36a..5963636864a4 100644 --- a/src/content/api/compilation-hooks.mdx +++ b/src/content/api/compilation-hooks.mdx @@ -115,6 +115,19 @@ Fired after the dependency optimization. - Callback Parameters: `modules` +### afterChunks + +`SyncHook` + + + +The `afterChunks` hook is invoked following the creation of the chunks and module graph, and prior to their optimization. +This hook provides an opportunity to examine, analyze, and modify the chunk graph if necessary. + +Here's [an example](https://github.com/webpack/webpack/blob/10be3f9e3fb34078af8c5841a77025a6722f11bf/lib/wasm-sync/WebAssemblyModulesPlugin.js#L114-L137) of how to utilize the `compilation.hooks.afterChunks` hook. + +- Callback Parameters: `chunks` + ### optimize `SyncHook` diff --git a/yarn.lock b/yarn.lock index ac93406b6c08..a9ec6ee17489 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2088,14 +2088,7 @@ dependencies: "@octokit/openapi-types" "^14.0.0" -"@octokit/types@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.0.0.tgz#6050db04ddf4188ec92d60e4da1a2ce0633ff635" - integrity sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw== - dependencies: - "@octokit/openapi-types" "^16.0.0" - -"@octokit/types@^9.2.2": +"@octokit/types@^9.0.0", "@octokit/types@^9.2.2": version "9.2.2" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.2.2.tgz#d111d33928f288f48083bfe49d8a9a5945e67db1" integrity sha512-9BjDxjgQIvCjNWZsbqyH5QC2Yni16oaE6xL+8SUBMzcYPF4TGQBXGA97Cl3KceK9mwiNMb1mOYCz6FbCCLEL+g==