From 3146aa33d9dd7e19e2eba76ed6126396b33c50bc Mon Sep 17 00:00:00 2001 From: gaoyuan Date: Thu, 1 Aug 2024 15:37:26 +0800 Subject: [PATCH] docs: list which hooks will be triggered again when rebuild (#3091) --- website/docs/en/plugins/dev/hooks.mdx | 11 +++++++++++ website/docs/zh/plugins/dev/hooks.mdx | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/website/docs/en/plugins/dev/hooks.mdx b/website/docs/en/plugins/dev/hooks.mdx index 30b78d8244..9f5fb023ee 100644 --- a/website/docs/en/plugins/dev/hooks.mdx +++ b/website/docs/en/plugins/dev/hooks.mdx @@ -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: @@ -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: diff --git a/website/docs/zh/plugins/dev/hooks.mdx b/website/docs/zh/plugins/dev/hooks.mdx index 8b12e901c1..06661480d3 100644 --- a/website/docs/zh/plugins/dev/hooks.mdx +++ b/website/docs/zh/plugins/dev/hooks.mdx @@ -56,6 +56,11 @@ - [onCloseDevServer](#onclosedevserver) - [onExit](#onexit) +当 rebuild 时,以下 hooks 会再次触发: + +- [modifyHTMLTags](#modifyhtmltags) +- [onDevCompileDone](#ondevcompiledone) + ### Build Hooks 执行 `rsbuild build` 命令或 `rsbuild.build()` 方法时,Rsbuild 会依次执行以下 hooks: @@ -70,6 +75,12 @@ - [onAfterBuild](#onafterbuild) - [onExit](#onexit) +当 rebuild 时,以下 hooks 会再次触发: + +- [onBeforeBuild](#onbeforebuild) +- [modifyHTMLTags](#modifyhtmltags) +- [onAfterBuild](#onafterbuild) + ### Preview Hooks 执行 `rsbuild preview` 命令或 `rsbuild.preview()` 方法时,Rsbuild 会依次执行以下 hooks: