To be clear, this is not a post about Javascript Bundling. This is about Javascript Merging.

So, I'm in Production Mode and I'm starting to look at the optimisation of Javascript Merging. My benchmarks are as follows:

  • Javascript Bundling = Off (226 js files load)
  • Javascript Bundling = On (223 js files load)

I honestly expected this difference to be much more significant. Magento Documentation says to just turn it on. But clearly, there's another level to it than that.

What am I missing to fully utilise the Javascript Merging feature?


After lots of tutorials I could manage to make this work by running:

bin/magento deploy:mode:set production

bin/magento config:set dev/js/enable_js_bundling 1

bin/magento config:set dev/js/minify_files 1

bin/magento config:set dev/static/sign 1

then I've deleted manually everything except .htaccess from pub/static and

bin/magento setup:static-content:deploy -f

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.