Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #174 from jay-es/issue169
Browse files Browse the repository at this point in the history
  • Loading branch information
naokie authored Jun 30, 2021
2 parents f7b57e9 + 8236f0a commit 2ca152b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion guide/api-hmr.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,12 @@ if (import.meta.hot) {
## `hot.on(event, cb)`
カスタム HMR イベントをリッスンします。カスタム HMR イベントは、プラグインから送信できます。詳細は [handleHotUpdate](./api-plugin#handlehotupdate) を参照してください。
HMR イベントを購読します。
以下の HMR イベントは Vite によって自動的にディスパッチされます:
- `'vite:beforeUpdate'` アップデートが適用される直前(例: モジュールが置き換えられるなど)
- `'vite:beforeFullReload'` 完全なリロードが発生する直前
- `'vite:beforePrune'` もう必要なくなったモジュールが取り除かれる直前
- `'vite:error'` エラーが発生したとき(例: 構文エラーなど)
カスタム HMR イベントは、プラグインから送信することもできます。詳細は [handleHotUpdate](./api-plugin#handlehotupdate) を参照してください。

0 comments on commit 2ca152b

Please sign in to comment.