Skip to content

Commit

Permalink
docs: correct onAfterCreateCompiler example (#2996)
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy authored Jul 23, 2024
1 parent 5eb9f5f commit bdb5c5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website/docs/en/plugins/dev/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/plugins/dev/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 实例。

## 参考范例

Expand Down

0 comments on commit bdb5c5d

Please sign in to comment.