betsol/assets-referencer-bundle
mix/vite).asset() helper or Vite/Publish already handle this natively, reducing need.laravel-twig-bridge), adding complexity.AppKernel to Laravel’s ServiceProvider).mix/vite already generate asset paths; overriding with this bundle risks duplication or broken asset fingerprinting.asset() helper or Vite’s @asset directive serve similar purposes with zero integration cost.readme score) suggests unstable API or lack of testing. No dependents or stars imply low community validation.asset() or Vite? What specific gaps does this bundle fill?mix, Vite, or manual public/ paths).base_url config dynamic? (e.g., per-environment, per-request) or static?AssetsReferencerBundle → custom AssetsReferencerServiceProvider).laravel-twig-bridge (~500 LOC) or switch to Twig entirely.asset() helper or Vite’s @asset already handle path resolution. This bundle would duplicate functionality unless used for non-standard asset sources (e.g., S3, custom storage)..env + asset() helper suffices.laravel-twig-bridge + custom Twig functions.asset_reference Twig function.// AppServiceProvider.php
public function boot() {
Twig::getEnvironment()->addFunction(new \Twig\TwigFunction(
'asset_reference',
[$this->app['assets'], 'resolvePath'] // Custom resolver
));
}
Kernel → ServiceProvider), and adapt to Laravel’s container.mix/vite if both generate paths. Solution: Use this bundle only for non-compiled assets (e.g., raw public/ files).mix manifest) may interfere with dynamic base_url updates.asset() in favor of the new function (if justified).DependencyInjection) for a simple use case.asset() helper if the bundle fails.mix/vite, may double asset resolution (bundle + compiler), increasing build times.| Scenario | Impact | Mitigation |
|---|---|---|
| Bundle update breaks | Asset paths fail | Pin version in composer.json |
| Twig bridge misconfig | Templates render broken links | Feature flag the function |
CDN base_url misconfig |
All assets 404 | Fallback to asset() helper |
| Laravel upgrade | Bundle compatibility lost | Isolate in a monorepo fork |
.env vs. config.yml).How can I help you explore Laravel packages today?