Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: correct onAfterCreateCompiler example #2996

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading