Skip to content

Commit bdc1b10

Browse files
authoredNov 20, 2024··
docs: rename HotUpdateContext to HotUpdateOptions (#1738)
1 parent 06e8661 commit bdc1b10

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎changes/hotupdate-hook.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ interface HmrContext {
2828

2929
このフックはすべての環境に対して一度だけ呼び出され、渡されたモジュールはクライアント環境と SSR 環境だけの情報が混在しています。フレームワークがカスタム環境に移行すると、それぞれの環境に対して呼び出される新しいフックが必要になります。
3030

31-
新しい `hotUpdate` フックは `handleHotUpdate` と同じように動作しますが、環境ごとに呼び出され、新しい `HotUpdateContext` インスタンスを受け取ります:
31+
新しい `hotUpdate` フックは `handleHotUpdate` と同じように動作しますが、環境ごとに呼び出され、新しい `HotUpdateOptions` インスタンスを受け取ります:
3232

3333
```ts
34-
interface HotUpdateContext {
34+
interface HotUpdateOptions {
3535
type: 'create' | 'update' | 'delete'
3636
file: string
3737
timestamp: number

‎guide/api-environment-plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Vite サーバーには共有プラグインパイプラインがありますが
5858
`hotUpdate` フックを使用すると、プラグインが指定された環境に対してカスタム HMR 更新処理を実行できるようになります。ファイルが変更されると、HMR アルゴリズムは `server.environments` の順番に従って各環境で順に実行されるので、`hotUpdate` フックは複数回呼び出されることになります。このフックは以下のシグネチャを持つコンテキストオブジェクトを受け取ります:
5959
6060
```ts
61-
interface HotUpdateContext {
61+
interface HotUpdateOptions {
6262
type: 'create' | 'update' | 'delete'
6363
file: string
6464
timestamp: number

0 commit comments

Comments
 (0)
Please sign in to comment.