Assets strategy

Webpack Encore packs

Three Composer packs to bootstrap a Symfony app on the Webpack Encore track — instead of AssetMapper.

Why Webpack Encore in 2026?

Symfony — and the Symfony UI initiative — clearly leans toward AssetMapper as the default for new projects. Zero build step, native ES module imports, lighter developer experience. It's the path the framework is investing in.

Yet Webpack Encore still powers a huge installed base of Symfony apps. Teams have years of production know-how on it: TypeScript, SCSS, React or Vue front-ends, code splitting, bundle analysis, CI integration. None of that is going away just because a new recipe shipped.

These three packs make it trivial to bootstrap a fresh Symfony 6.3+ app on the Webpack Encore track — keeping the build chain your team already knows while still benefiting from the modern Symfony skeleton.

Heads up — they don't mix

AssetMapper and Webpack Encore are mutually exclusive in a single project. Each one expects to own the asset pipeline. All three webpack-encore packs declare an explicit Composer conflict on symfony/asset-mapper, so installation will fail fast if AssetMapper is already there.

Pick one strategy per app and stick with it. Migrating later is doable, but it's not a "we'll just enable both for the transition" kind of move.

"conflict": {
    "symfony/asset-mapper": "*"
}

Pros & cons at a glance

Both strategies are valid, both are supported by the Symfony ecosystem. Pick the one that matches your team and your front-end ambitions.

Strategy Pros Cons
AssetMapper
Symfony's modern default
  • Zero build step — no Node, no node_modules
  • Native ES module imports, fastest dev feedback
  • Symfony UI defaults align with it
  • Less moving parts in CI
  • Limited TypeScript / SCSS preprocessing
  • Hard to scale to React or Vue SPAs
  • Younger ecosystem, fewer recipes
Webpack Encore
The classic Symfony build chain
  • Huge installed base, long track record
  • First-class TypeScript, SCSS, React, Vue, …
  • Code splitting, tree-shaking, bundle analysis
  • Mature CI integrations
  • Requires Node and node_modules
  • Slower dev feedback than native ESM
  • Symfony UI is steering away from it

Ready to give them a try?

All three packs are MIT-licensed and live on GitHub. One composer require, you're set.

← Back to home