Bun Hot Reloading
Accelerates local development workflows using Bun's built-in hot reloading, watch mode, and module replacement patterns.
Bun Hot Reloading guides developers through configuring and optimizing real-time code updates using Bun's native watch mode (--watch) and hot module replacement (--hot). It equips Claude with specialized patterns for preserving application state in Bun.serve HTTP and WebSocket servers, managing lifecycle hooks with import.meta.hot, preventing memory leaks through disposal callbacks, and integrating smoothly with frontend tools like Vite and Bun's built-in test runner.
Key Features
01Guides state preservation across hot reloads using Bun.serve and globalThis patterns
02Troubleshoots common reload pitfalls such as port collision, memory leaks, and unwatched files
03Implements import.meta.hot lifecycle management including accept, dispose, and decline
04239 GitHub stars
05Differentiates between full process restarts (--watch) and in-place module reloads (--hot)
06Configures automated live reload setups for HTTP, WebSocket servers, and Bun tests
Use Cases
01Setting up custom WebSocket-based live reloading for full-stack Bun applications
02Configuring automated test and build watchers in package.json for instantaneous feedback during coding
03Developing high-performance HTTP APIs with Bun.serve without dropping database or memory state on code edits