Back to plain old assets install
Even years after it’s been written and even though it applies to older versions, our post about installing assets on Symfony is still one of the top-read posts on this blog.
Fact is, in the following years we did not spend much time on the topic anymore as most of our latest Symfony projects are API backend used by native apps or Vue.JS frontends. We still have admin areas but assets management is usually straightforward and does not require a dedicated management system. The net result of this is that we never got around to switch to the Webpack Encore system.
Turns out, it was a good move. Latest Symfony versions introduce a new AssetMapper component which removes most of the complexity and additional technology required by the previous system. To be honest, this was possible due to significant improvement in HTTP (compression / multiple requests) and in CSS (custom properties / nesting).
This is a welcome change. Using Symfony console command to build assets for a Symfony project seems the most efficient choice: the availability of many tools should not trick you into using them all. So, well done Symfony team! As we plan the upgrade to Symfony 6 for our projects in the next 12 months, we will definitely be happier to use a simple, lean, well-integrated assets install tool.
P.S. if you have a Symfony project to upgrade, get in touch!