Skip to content

Commit

Permalink
docs: list which hooks will be triggered again when rebuild (#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy authored Aug 1, 2024
1 parent 50ae5a1 commit 3146aa3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/docs/en/plugins/dev/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ When the `rsbuild dev` command or `rsbuild.startDevServer()` method is executed,
- [onCloseDevServer](#onclosedevserver)
- [onExit](#onexit)

When rebuilding, the following hooks will be triggered again:

- [modifyHTMLTags](#modifyhtmltags)
- [onDevCompileDone](#ondevcompiledone)

### Build Hooks

When the `rsbuild build` command or `rsbuild.build()` method is executed, Rsbuild will execute the following hooks in order:
Expand All @@ -70,6 +75,12 @@ When the `rsbuild build` command or `rsbuild.build()` method is executed, Rsbuil
- [onAfterBuild](#onafterbuild)
- [onExit](#onexit)

When rebuilding, the following hooks will be triggered again:

- [onBeforeBuild](#onbeforebuild)
- [modifyHTMLTags](#modifyhtmltags)
- [onAfterBuild](#onafterbuild)

### Preview Hooks

When executing the `rsbuild preview` command or `rsbuild.preview()` method, Rsbuild will execute the following hooks in order:
Expand Down
11 changes: 11 additions & 0 deletions website/docs/zh/plugins/dev/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
- [onCloseDevServer](#onclosedevserver)
- [onExit](#onexit)

当 rebuild 时,以下 hooks 会再次触发:

- [modifyHTMLTags](#modifyhtmltags)
- [onDevCompileDone](#ondevcompiledone)

### Build Hooks

执行 `rsbuild build` 命令或 `rsbuild.build()` 方法时,Rsbuild 会依次执行以下 hooks:
Expand All @@ -70,6 +75,12 @@
- [onAfterBuild](#onafterbuild)
- [onExit](#onexit)

当 rebuild 时,以下 hooks 会再次触发:

- [onBeforeBuild](#onbeforebuild)
- [modifyHTMLTags](#modifyhtmltags)
- [onAfterBuild](#onafterbuild)

### Preview Hooks

执行 `rsbuild preview` 命令或 `rsbuild.preview()` 方法时,Rsbuild 会依次执行以下 hooks:
Expand Down

0 comments on commit 3146aa3

Please sign in to comment.