Skip to content

Commit 63244e8

Browse files
authored
docs: clarify kind for hotUpdate / handleHotUpdate hooks (#20700)
1 parent 7f6af9d commit 63244e8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

docs/guide/api-environment-plugins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Plugins should set default values using the `config` hook. To configure each env
7070
## The `hotUpdate` Hook
7171

7272
- **Type:** `(this: { environment: DevEnvironment }, options: HotUpdateOptions) => Array<EnvironmentModuleNode> | void | Promise<Array<EnvironmentModuleNode> | void>`
73+
- **Kind:** `async`, `sequential`
7374
- **See also:** [HMR API](./api-hmr)
7475

7576
The `hotUpdate` hook allows plugins to perform custom HMR update handling for a given environment. When a file changes, the HMR algorithm is run for each environment in series according to the order in `server.environments`, so the `hotUpdate` hook will be called multiple times. The hook receives a context object with the following signature:

docs/guide/api-plugin.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo
403403
### `handleHotUpdate`
404404

405405
- **Type:** `(ctx: HmrContext) => Array<ModuleNode> | void | Promise<Array<ModuleNode> | void>`
406+
- **Kind:** `async`, `sequential`
406407
- **See also:** [HMR API](./api-hmr)
407408

408409
Perform custom HMR update handling. The hook receives a context object with the following signature:

0 commit comments

Comments
 (0)