Function: installViteHMR()
Imported from
@react-logic/diinstallViteHMR(
hot):void
Defined in: di/src/lib/hmr.ts:35
Wires the default adapter's reset into Vite's pre-update event so every HMR cycle disposes the global scope cleanly.
Parameters
hot
false | ViteHot | undefined
Returns
void
Example
// main.tsx
import { installViteHMR } from '@react-logic/di';
installViteHMR(import.meta.hot);