diff --git a/website/docs/en/plugins/dev/index.mdx b/website/docs/en/plugins/dev/index.mdx index cb119d332c..84e87e0536 100644 --- a/website/docs/en/plugins/dev/index.mdx +++ b/website/docs/en/plugins/dev/index.mdx @@ -224,7 +224,7 @@ The Rsbuild plugin can modify the configuration of Rspack in various ways. - `api.modifyRspackConfig(config => {})` modifies the final Rspack configuration. - `api.modifyBundlerChain(chain => {})` modifies the `rspack-chain`, usage is similar to [rspack-chain](https://github.com/rspack-contrib/rspack-chain). -- `api.onAfterCreateCompiler(compiler => {})` directly operates on the Rspack compiler instance. +- `api.onAfterCreateCompiler({ compiler } => {})` directly operates on the Rspack compiler instance. ## Example References diff --git a/website/docs/zh/plugins/dev/index.mdx b/website/docs/zh/plugins/dev/index.mdx index 1a3a7216b3..344e80418c 100644 --- a/website/docs/zh/plugins/dev/index.mdx +++ b/website/docs/zh/plugins/dev/index.mdx @@ -223,7 +223,7 @@ Rsbuild 插件可以通过多种方式修改 Rspack 的配置项。 - `api.modifyRspackConfig(config => {})` 修改最终的 Rspack 配置。 - `api.modifyBundlerChain(chain => {})` 修改 `rspack-chain`,用法与 [rspack-chain](https://github.com/rspack-contrib/rspack-chain) 相同。 -- `api.onAfterCreateCompiler(compiler => {})` 直接操作 Rspack 的 compiler 实例。 +- `api.onAfterCreateCompiler({ compiler } => {})` 直接操作 Rspack 的 compiler 实例。 ## 参考范例