-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: split plugins api * docs: split plugins api en * fix: dead link
- Loading branch information
Showing
23 changed files
with
501 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
["index", "cli", "modules", "node-api", "hmr", "loader-api", "plugin-api"] | ||
[ | ||
"index", | ||
"cli", | ||
"modules", | ||
"node-api", | ||
"hmr", | ||
"loader-api", | ||
{ | ||
"type": "dir", | ||
"name": "plugin-api", | ||
"label": "Plugin API" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
"index", | ||
"compiler-hooks", | ||
"compilation-hooks", | ||
"normal-module-factory-hooks", | ||
"context-module-factory-hooks" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Compilation Hooks | ||
|
||
## `buildModule` | ||
|
||
`SyncHook<[JsModule]>` | ||
|
||
Triggered before a module build has started, can be used to modify the module (Rspack currently only support reading the module, modifying is not supported yet). | ||
|
||
## `processAssets` | ||
|
||
`AsyncSeriesHook<[CompilationAssets]>` | ||
|
||
Process the assets before emit. | ||
|
||
## `optimizeModules` | ||
|
||
`SyncBailHook<[JsModule[]]>` | ||
|
||
Called at the beginning of the module optimization phase. A plugin can tap into this hook to perform optimizations on modules. | ||
|
||
## `optimizeChunkModule` | ||
|
||
`AsyncSeriesBailHook<[JsModule[]]>` | ||
|
||
Called after the tree optimization, at the beginning of the chunk modules optimization. A plugin can tap into this hook to perform optimizations of chunk modules. | ||
|
||
## `succeedModule` | ||
|
||
`SyncHook<[JsModule]>` | ||
|
||
Executed when a module has been built successfully. | ||
|
||
## `finishModules` | ||
|
||
`AsyncSeriesHook<[JsModule[]]>` | ||
|
||
Called when all modules have been built without errors. | ||
|
||
## `chunkAsset` | ||
|
||
`SyncHook<[JsChunk[], string /** filename*/ ]>` | ||
|
||
Triggered when an asset from a chunk was added to the compilation. |
Oops, something went wrong.