Webpack Encore wraps Webpack with a concise API for bundling JavaScript, preprocessing CSS, and compiling front-end assets. It is maintained for Symfony but usable in other stacks.
Overview
Webpack Encore offers a simpler integration path on top of Webpack. It exposes an API for bundling JavaScript modules, preprocessing CSS and JavaScript, and compiling or minifying assets for production.
The project is associated with Symfony and pairs with the webpack-encore-bundle for Twig helpers, though it can be used outside Symfony and outside PHP. Encore follows Webpack naming and concepts, inspired by Webpacker and Laravel Mix while staying close to native Webpack behavior.
Encore sits alongside AssetMapper and Symfony Reprise in the Symfony asset toolchain. Encore requires Node.js and a build step, supports Sass, PostCSS, TypeScript, and JSX or Vue and Svelte workflows, and can emit versioned entrypoints and manifests for templates.
Maintenance stays low-touch: bug fixes, security patches, and peer dependency updates. New Symfony projects are steered toward AssetMapper or Reprise when a faster bundler integration is preferred.
Key features
- Webpack wrapper with simplified configuration API
- JavaScript module bundling and code splitting
- CSS and JS preprocessing pipelines
- Asset compilation and minification
- Symfony entrypoints and manifest output
- React, Vue, Svelte, and TypeScript support
- Stimulus and Symfony UX integration path
- Configurable CSS minimizer plugin
Use cases
- Symfony applications needing compiled front-end assets
- Projects migrating from AssetMapper to a bundler
- Teams wanting Webpack without full manual config
- Stimulus and UX component front-end builds