File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments