I have enabled the Javascript bundling, however, it doesn't seem to work properly.

I can see the bundles are being created in pub/static/vendor/theme/en_GB/js:

enter image description here

However, the bundles are not being loaded on the website:

enter image description here

I am in production mode. Disabled all 3rd party modules and themes. Still the same.

2 Answers 2


I figured it out. Although Magento was saying the deploy mode is set to production, it was still locked at default at NginX. I had to add:

location / {
   fastcgi_param   MAGE_MODE  production; #MAGE_MODE = production

I just did the following and the problem was solved:

bin/magento setup:upgrade

bin/magento indexer:reindex

bin/magento deploy:mode:set production -s

Here was the secret: run the di:compile after production

bin/magento setup:di:compile

bin/magento setup:static-content:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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