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
Webpack Bundle

Webpack Bundle Laravel Package

freshheads/webpack-bundle

Freshheads WebpackBundle integrates Webpack-built assets with Symfony, making it easier to reference compiled JavaScript and CSS from templates and keep frontend assets in sync with your application.

View on GitHub
Deep Wiki
Context7

Freshheads WebpackBundle integrates Webpack Encore into Symfony applications, providing a simple way to manage and reference compiled front-end assets. It bridges Symfony’s templating and asset handling with Webpack’s build output, so you can use versioned bundles and development-server URLs without manual path management.

  • Twig helpers for rendering Webpack assets
  • Support for Webpack Encore manifests and entrypoints
  • Development server integration for hot reloading
  • Configurable asset paths and versioning
  • Symfony-native service and configuration setup
Frequently asked questions about Webpack Bundle
Is freshheads/webpack-bundle a Laravel package?
No. freshheads/webpack-bundle is a Symfony bundle that registers a dependency-injection extension and Twig functions for resolving webpack asset paths. Laravel does not use Symfony bundles or Twig by default, so it is not a native Laravel package. For Laravel asset handling, use laravel-vite-plugin with Vite::asset() or the legacy mix() helper.
How do I install freshheads/webpack-bundle in a Laravel app?
You generally should not. Installing it would require adding symfony/twig-bundle, symfony/dependency-injection, and symfony/http-kernel alongside Laravel's container, then bridging two service-container models. That is significant architectural overhead for manifest path lookup that Laravel already provides. If you need webpack manifest resolution, implement a small AssetManifest service in a Laravel service provider instead.
Does FHWebpackBundle work with Laravel Blade templates?
No, not directly. The bundle's only integration surface is Twig, exposing Twig functions that read a webpack manifest. Laravel ships Blade by default and has no bundle/kernel-extension concept. You would need to add Twig to Laravel and wrap the bundle's functions in a Blade directive or helper, which is more work than writing the resolver yourself.
Which Laravel versions support freshheads/webpack-bundle?
None are officially supported. The package targets Symfony and Twig, not Laravel, so its version constraints cover Symfony components and Twig 2/3, not Laravel releases. Any Laravel use would be an unsupported integration you own entirely. Treat Laravel version compatibility as unknown unless your team explicitly verifies and maintains it.
How does freshheads/webpack-bundle compare to Laravel Vite?
Laravel Vite is the first-party path: laravel-vite-plugin plus Vite::asset() in Blade handles hashed asset paths, entrypoints, and CDN prefixes with Laravel's release cadence and security process. FHWebpackBundle is a Symfony/Twig bundle aimed at webpack manifest lookup. The functional overlap is near-total for path resolution, and Vite is the default in Laravel 9/10 and later. For most Laravel teams, adopting the bundle is strictly worse than using Vite.
Can I use FHWebpackBundle with an existing webpack manifest.json in Laravel?
You can replicate the capability without the bundle. A Laravel service can read and cache manifest.json, map logical names to hashed paths, and apply a configurable base or CDN URL. Register it as a singleton in a service provider and expose a Blade directive such as @assetpath('js/app.js'). That is roughly 50–80 lines and avoids pulling Symfony components into Laravel.
Is freshheads/webpack-bundle safe and maintained for production?
Adoption signal is the main risk: the package has about 2 stars and 0 dependents, so your team would be the first production consumer. It is a single-vendor Freshheads bundle with no visible contributor base, raising abandonment risk. MIT licensing is fine, but a zero-adopter package likely won't appear in vulnerability feeds, leaving CVE triage to you. Also verify the recorded last release date, which appears anomalous.
How do I test freshheads/webpack-bundle assets in a Laravel application?
There is no Laravel-native test path. If you build your own manifest resolver, add a config-cache-safe test that asserts every referenced asset key exists in the manifest and that the base URL prefix is applied. For the bundle itself, you would need to test through Symfony/Twig integration, which is disproportionate for a path-lookup feature. Keep tests focused on your manifest contents and Blade directive output.
What are alternatives to freshheads/webpack-bundle for Laravel asset management?
Use laravel-vite-plugin with Vite::asset() for the modern default, or laravel-mix with mix() if webpack is mandated. If you have a legacy webpack build that emits manifest.json, write a small AssetManifest service and a Blade directive rather than adopting a Symfony bundle. These first-party or in-house options carry lower maintenance and security overhead.
Does FHWebpackBundle support entrypoint resolution, integrity hashes, or cache warming?
The public description and Twig surface focus on creating paths to webpack assets from a manifest; it does not claim broader build orchestration. The evaluation notes that beyond manifest lookup, features like integrity hashes, CSS/JS splitting, entrypoint resolution, and cache warming are unclear or absent. If path lookup is all you need, build versus adopt is settled in favor of a small in-house resolver. Verify the source before assuming any advanced webpack feature support.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons