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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-es committed Jun 26, 2021
1 parent 337e933 commit 399879c
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) を参照してください。
Listen to an HMR event.
The following HMR events are dispatched by Vite automatically:
- `'vite:beforeUpdate'` when an update is about to be applied (e.g. a module will be replaced)
- `'vite:beforeFullReload'` when a full reload is about to occur
- `'vite:beforePrune'` when modules that are no longer needed are about to be pruned
- `'vite:error'` when an error occurs (e.g. syntax error)
Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plugin#handlehotupdate) for more details.

0 comments on commit 399879c

Please sign in to comment.