Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Vite For Wp Laravel Package

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.

Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for WordPress asset plumbing. Every WP plugin/theme that bundles modern JS ends up re-implementing the same ~100–200 lines: parse 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.
  • Toolchain roadmap: webpack/Laravel Mix → Vite. If the roadmap includes modernizing frontend DX on WP properties, this is the migration shim. It makes the Vite decision reversible and cheap, which lowers the cost of committing to it.
  • Feature-level: iteration speed on JS-heavy WP surfaces. Block editor sidebars, settings SPAs, custom admin apps, and WooCommerce checkout customizations benefit most from HMR; marketing-page CSS tweaks benefit least. Use it to scope which surfaces get the new toolchain first.
  • Agency/portfolio standardization. If you maintain a fleet of WP sites or a plugin product line, a single shared Vite convention (one dev-dependency, one enqueue helper) is a meaningful reduction in per-site variance — worth a standards decision, not just a per-project one.
  • Make/buy on the integration itself: the alternative is an in-house ViteAssets class. Choose this package if you value not owning that class; choose in-house if you need behavior it doesn't expose.

When to Consider This Package

Adopt when all of these hold:

  • You are building a WordPress plugin or theme (this is a WP package — it hooks wp_enqueue_script/wp_enqueue_style; it is not a Laravel package).
  • Your frontend already builds with Vite (or you're actively migrating to it), and you control the Node build step in CI.
  • You want manifest-based cache-busted production enqueues and dev-server HMR without writing the resolver yourself.
  • You're comfortable with Composer on the PHP side and a single small, GPL-2.0-licensed dependency.

Look elsewhere when:

  • The stack is Laravel, Symfony, or any non-WP PHP framework. Laravel ships a first-party Vite integration; using a WP-targeted adapter here is the wrong tool and will cost you more than it saves. This is the single most important disqualifier given how the package was surfaced.
  • You can't add a Node/Vite build step (classic themes, locked-down hosting, no CI for assets).
  • You need guarantees a 328-star, effectively single-maintainer project can't give — long-term support contracts, security SLAs, or a vendor who will answer in a day. The low opportunity score (6.38) is a signal of modest momentum, not a defect, but plan for the bus factor.
  • You need a supported plugin surface for exotic cases (multiple entry points per page, module preload tuning, CSP nonces on the dev server) — verify against your requirements before committing; a ~50-line in-house resolver may fit better.
  • License compatibility is a concern for a distributed proprietary product — GPL-2.0 is idiomatic in the WP ecosystem but constrains how you ship.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib