From 399879c4cd0037be1e1e33850a8b9d03dd85474a Mon Sep 17 00:00:00 2001 From: Jun Shindo <46585162+jay-es@users.noreply.github.com> Date: Sat, 26 Jun 2021 23:22:47 +0900 Subject: [PATCH] apply vitejs/vite@de1ddd4 --- guide/api-hmr.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guide/api-hmr.md b/guide/api-hmr.md index 1994d39..ec08a6c 100644 --- a/guide/api-hmr.md +++ b/guide/api-hmr.md @@ -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.