Skip to content

Commit e29b956

Browse files
authored
docs(api): document afterChunks (#6828)
* docs(api): document afterChunks * Update src/content/api/compilation-hooks.mdx
1 parent f00b858 commit e29b956

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/content/api/compilation-hooks.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ Fired after the dependency optimization.
115115

116116
- Callback Parameters: `modules`
117117

118+
### afterChunks
119+
120+
`SyncHook`
121+
122+
<Badge text="5.83.0+" />
123+
124+
The `afterChunks` hook is invoked following the creation of the chunks and module graph, and prior to their optimization.
125+
This hook provides an opportunity to examine, analyze, and modify the chunk graph if necessary.
126+
127+
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.
128+
129+
- Callback Parameters: `chunks`
130+
118131
### optimize
119132

120133
`SyncHook`

yarn.lock

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,14 +2088,7 @@
20882088
dependencies:
20892089
"@octokit/openapi-types" "^14.0.0"
20902090

2091-
"@octokit/types@^9.0.0":
2092-
version "9.0.0"
2093-
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.0.0.tgz#6050db04ddf4188ec92d60e4da1a2ce0633ff635"
2094-
integrity sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==
2095-
dependencies:
2096-
"@octokit/openapi-types" "^16.0.0"
2097-
2098-
"@octokit/types@^9.2.2":
2091+
"@octokit/types@^9.0.0", "@octokit/types@^9.2.2":
20992092
version "9.2.2"
21002093
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.2.2.tgz#d111d33928f288f48083bfe49d8a9a5945e67db1"
21012094
integrity sha512-9BjDxjgQIvCjNWZsbqyH5QC2Yni16oaE6xL+8SUBMzcYPF4TGQBXGA97Cl3KceK9mwiNMb1mOYCz6FbCCLEL+g==

0 commit comments

Comments
 (0)