I would like to briefly introduce you to library mehrkanal/twig-encore-extension. The goal is to run a Mezzio application with a bundler like Webpack.
Since there is “Webpack Encore” for this task in Symfony, which is combined with Twig, I have also combined Webpack with Twig to use it for Laminas.
You can find the repository at twig-encore-extension/README.md at develop · mehrkanal/twig-encore-extension · GitHub
If you find it interesting, or have any questions, ask me