You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vks 0f73dde6de
项目任务书
10 months ago
..
dist 项目任务书 10 months ago
LICENSE 项目任务书 10 months ago
README.md 项目任务书 10 months ago
package.json 项目任务书 10 months ago

README.md

vite-hot-client

NPM version

Get Vite's import.meta.hot at runtime.

You don't normally need this library directly. It's designed for embedded UI on top of Vite for client-server communication. For example:

Install

npm i vite-hot-client

Usage

import { hot } from 'vite-hot-client'

// import.meta.hot
if (hot) {
  hot.on('update', () => {
    // ...
  })
}
import { createHotContext } from 'vite-hot-client'

const hot = createHotContext('/path/to/module')

if (hot) {
  // ...
}

Sponsors

License

MIT License © 2022 Anthony Fu