0.0.1 • Published 2 years ago
vite-plugin-hot-client v0.0.1
vite-plugin-hot-client
Get Vite's
import.meta.hot
at runtime.
Install
npm i vite-plugin-hot-client
Usage
import { hot } from 'vite-plugin-hot-client'
// import.meta.hot
if (hot) {
hot.on('update', () => {
// ...
})
}
import { createHotContext } from 'vite-plugin-hot-client
'
const hot = createHotContext('/path/to/module')
if (hot) {
// ...
}
License
0.0.1
2 years ago