$ account defstudio
This repository provides a Vite plugin (`@defstudio/vite-livewire-plugin`) that enables hot reload for Laravel Livewire components without a full page refresh. It watches for changes in Blade templates and Livewire PHP classes, then sends a custom event to the browser. The injected client-side script listens for this event and calls `$refresh` on all Livewire components, preserving their state. The plugin also supports optional CSS/JS refresh, an opt-in checkbox for toggling hot reload, and configurable watch patterns. It is a single-file TypeScript plugin with a robust configuration parser that accepts strings, arrays, or objects. The code is well-structured, includes comprehensive tests, and follows modern Vite plugin conventions. The repository is actively maintained with recent releases and CI workflows, though the last commit date appears anomalous (future date).