symfony/webpack-encore-bundle
Symfony bundle integrating Webpack Encore into your app. Adds asset building, versioning, and entrypoint management with simple Twig helpers for scripts/styles, plus sane defaults and easy configuration for modern JS/CSS workflows.
Frontend Asset Optimization Roadmap:
splitEntryChunks()) to reduce initial load time and improve Core Web Vitals (LCP, FID).Stimulus.js Integration:
symfony/stimulus-bundle but still supported for legacy projects).stimulus_controller(), stimulus_action()).Performance-Critical Use Cases:
entrypoints.json hosting: Reduce build artifacts in version control by offloading Webpack metadata to a CDN or CI-generated endpoint.integrity hashes to <link> tags for resource hints, improving security and reliability.Tech Stack Modernization:
symfony/stimulus-bundle to reduce technical debt.Adopt if:
symfony/stimulus-bundle long-term).Look elsewhere if:
entrypoints.json format.webpack-blocks.For Executives: "This package lets us automate Webpack asset optimization in Symfony, cutting initial load times by 30–50% through code-splitting and lazy-loading. It’s a maintenance-free upgrade—no need to hire frontend experts—while enabling features like real-time form validation (Stimulus.js) without extra dev work. Used by Symfony’s core team, it’s battle-tested and aligns with our roadmap for faster, more scalable apps."
For Engineering: *"The WebpackEncoreBundle handles the heavy lifting of:
<script>/<link> tags from Webpack’s entrypoints.json (local or remote).stimulus_controller() filters (deprecated but still useful for legacy code).integrity hashes (reduces flash-of-unstyled-content).entrypoints.json to shrink repo size.For Developers:
*"Stop manually writing <script> tags! This bundle:
app.js only loads on /app).{{ stimulus_controller('hello') }}).composer require symfony/webpack-encore-bundle.webpack.config.js with splitChunks.{{ encore_entry_link_tags() }} in Twig.
Pro tip: Enable remote entrypoints.json to avoid bloating your repo with build artifacts."*How can I help you explore Laravel packages today?