New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vite-hot-client

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-hot-client

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

  • 2.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
680K
decreased by-13.65%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 09 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc