Skip to content

Commit 40659b3

Browse files
committed
docs(cn): resolve conflicts
1 parent ed6c18d commit 40659b3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

docs/plugin-development/index.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -877,21 +877,15 @@ function augmentWithDatePlugin() {
877877

878878
| | |
879879
| --: | :-- |
880-
<<<<<<< HEAD
881-
| 类型: | `closeBundle: () => Promise<void> \| void` |
880+
| 类型: | `closeBundle: (error?: Error) => Promise<void> \| void` |
882881
| 类别: | async,parallel |
883882
| 上一个钩子: | 如果有构建错误,则为 [`buildEnd`](#buildend),否则为调用 [`bundle.close()`](../javascript-api/index.md#rollup-rollup),在这种情况下,这将是最后一个触发的钩子 |
884-
=======
885-
| Type: | `closeBundle: (error?: Error) => Promise<void> \| void` |
886-
| Kind: | async, parallel |
887-
| Previous: | [`buildEnd`](#buildend) if there was a build error, otherwise when [`bundle.close()`](../javascript-api/index.md#rollup-rollup) is called, in which case this would be the last hook to be triggered |
888-
>>>>>>> 70ef1cce7c740030cc2935b563d13950cc1511f5
889883

890884
可用于清理可能正在运行的任何外部服务。Rollup 的 CLI 将确保在每次运行后调用此钩子,但是 JavaScript API 的用户有责任在生成产物后手动调用 `bundle.close()`。因此,任何依赖此功能的插件都应在其文档中仔细提到这一点。
891885

892886
如果插件想要在监视模式下保留资源,则可以在此钩子中检查 [`this.meta.watchMode`](#this-meta) 并在 [`closeWatcher`](#closewatcher) 中执行必要的监视模式清理。
893887

894-
If an error occurs during build or the `buildEnd` hook, it is passed to this hook as first argument.
888+
如果在构建过程或执行 `buildEnd` 钩子时发生错误,那么这个错误会作为第一个参数传递给这个钩子。
895889

896890
### footer
897891

0 commit comments

Comments
 (0)