You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/api/compilation-hooks.mdx
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,19 @@ Fired after the dependency optimization.
115
115
116
116
- Callback Parameters: `modules`
117
117
118
+
### afterChunks
119
+
120
+
`SyncHook`
121
+
122
+
<Badgetext="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.
0 commit comments