vite-syntax-hmr-api
OfficialMaster Vite HMR APIs for robust updates
Software Engineering#typescript#vite#web-development#hmr#hot module replacement#module-boundaries#import.meta.hot
AuthorOpenAEC-Foundation
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a structured guide to correctly implement and troubleshoot Vite's HMR APIs within modules, ensuring safe and predictable hot updates.
Core Features & Use Cases
- Guarded usage of import.meta.hot: ensures updates are only processed in development with proper safety checks.
- HMR boundary patterns: explains when and how to use accept(), dispose(), prune(), and invalidate() to maintain state and minimize full reloads.
- Event-driven updates: documents on()/off()/send() for built-in and custom HMR events to coordinate complex workflows across modules.
Quick Start
Implement Vite HMR boundaries in a module by guarding import.meta.hot and wiring accept() and dispose() to persist state across updates.
Dependency Matrix
Required Modules
None requiredComponents
references
š» Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: vite-syntax-hmr-api Download link: https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-Composer/archive/main.zip#vite-syntax-hmr-api Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.