{"library":"vite-hot-client","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"2.1.0","tags":["javascript","typescript"],"last_verified":"Mon Apr 27","install":[{"cmd":"npm install vite-hot-client","imports":["import { hot } from 'vite-hot-client'","import { createHotContext } from 'vite-hot-client'","import { tryCreateHotContext } from 'vite-hot-client'"]},{"cmd":"yarn add vite-hot-client","imports":[]},{"cmd":"pnpm add vite-hot-client","imports":[]}],"homepage":null,"github":"https://github.com/antfu/vite-hot-client","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vite-hot-client","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}