kucrut/vite-for-wp
Vite for WP integrates the Vite build tool with WordPress, giving theme and plugin developers fast HMR in development and simple manifest-based asset loading in production. It handles enqueueing scripts and styles with minimal configuration and no build headaches.
manifest.json, resolve hashed filenames, enqueue with correct dependencies, and swap to the Vite dev server URL under HMR. This package is the "buy" (well, adopt) side of that decision — it removes bespoke glue that is otherwise maintained per project.ViteAssets class. Choose this package if you value not owning that class; choose in-house if you need behavior it doesn't expose.Adopt when all of these hold:
wp_enqueue_script/wp_enqueue_style; it is not a Laravel package).Look elsewhere when:
For executives: This is a small, cheap, removable adapter that lets our WordPress frontend work use Vite instead of hand-rolled asset wiring. The business case is cycle time: hot module reload cuts the edit-refresh loop on JS-heavy admin and theme work, and we stop paying engineers to re-write the same manifest-parsing code on every project. Cost is one GPL-2.0 Composer dependency; risk is low because it's a thin layer we can replace in an afternoon.
For engineering: It replaces our bespoke enqueue helper with a maintained one: reads the Vite manifest, enqueues hashed production assets, and swaps to the dev server with HMR when running vite dev. Roughly a day of integration for a project, and it deletes code rather than adding surface area. Two caveats to accept explicitly: it's WordPress-specific (do not reach for it in Laravel — use the framework's own Vite plugin), and it's a small community project, so we pin the version and keep our own thin wrapper so a swap-out stays cheap.
How can I help you explore Laravel packages today?