vite-hot-client

JSON →
library 2.1.0 ·javascript
verified Apr 27, 2026

A lightweight utility (v2.1.0, actively maintained) that allows you to access Vite's HMR API (`import.meta.hot`) at runtime, even in contexts where `import.meta.hot` is not directly available (e.g., inside iframes, worker threads, or dynamically evaluated code). It provides `hot`, `createHotContext`, and `tryCreateHotContext` functions. Key differentiator: solves the problem of accessing Vite's HMR client from outside standard Vite-managed modules, enabling dev tools like `vite-plugin-inspect` to communicate with the dev server over HMR. Requires `vite` ^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0. Ships TypeScript definitions and is ESM-only since v2.

total hits 13
actors 4 distinct systems
last hit 7d ago human
GPTBot
5
MetaBot
3
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France