motomedialab/laravel-vite-helper
A lightweight Laravel package that adds convenient Blade directives and PHP helpers for Vite, simplifying asset resolution, dev-server detection, and script/style tag generation. It works with Vite's manifest and hot file so you can ship frontend assets with less boilerplate.
/build/assets/app-abc123.css) break. This package resolves them against APP_URL..env-based URL concatenation. This is a "buy" only in the sense that adoption cost is near zero; it is not a strategic dependency, and it should not be treated as one in architecture or vendor-risk reviews.asset() wrappers.Adopt when:
APP_URL and you need consistent resolution logic in one place.Look elsewhere / do not adopt when:
Vite::asset() already returns a usable relative URL; this adds no value.asset()) — the package is irrelevant.Adoption hygiene: wrap it behind a single internal facade or service even if you adopt it directly. The abstraction costs an hour and converts "dependency" into "implementation detail," which is the correct risk posture for a 30-star utility.
To executives: This is a small, free, MIT-licensed utility that fixes a specific and common failure mode — broken images and missing styles in emails, feeds, and social previews, because asset links are generated as relative paths that only work inside a browser. It is low-cost to adopt, low-risk to remove (permissive license, tiny surface area), and it removes a recurring class of customer-visible defects that otherwise surface after every deploy. It is not a platform bet; it is a fastener.
To engineering: One job done correctly — resolve Vite manifest paths into absolute URLs using the app's configured base URL, respecting hashed filenames. Replaces ad-hoc config('app.url') . Vite::asset(...) concatenation that breaks on CDN/subdirectory deploys and drifts as hashes change. Caveats to accept explicitly: narrow scope, small community, single maintainer — so we pin the version, wrap it behind our own helper, and treat forking as a pre-approved option. If the team prefers zero third-party surface for something this small, the fallback is a 15-line internal helper with equivalent behavior; the decision is "centralize and test this," and the package is simply the cheapest way to do so today.
How can I help you explore Laravel packages today?