2

i have enabled production mode and bundling also yet i am seeing to many js file call aroun 120 plus that is causing issue with load time

2

1
  • you can Easily exclude js from bundle or you can increase bundle size from etc/view.xml
    – Sanju
    Commented Nov 19, 2019 at 13:01

1 Answer 1

1

You can execute below commands in your magento root console to merge and bundle javascript files.

php bin/magento config:set dev/js/merge_files 1
php bin/magento config:set dev/js/enable_js_bundling 1
php bin/magento config:set dev/js/minify_files 1

Then execute compilation and static content deploy on your console and it should resolve your issue.

5
  • i am getting below There are no commands defined in the "config" namespace. Did you mean one of these? setup:config setup:store-config Commented Nov 19, 2019 at 13:29
  • Which magento version are you using? Commented Nov 19, 2019 at 13:30
  • magento 2.1.5......... Commented Nov 19, 2019 at 13:31
  • Okay, no problem, just enable merge, bundle and minify javascript from admin panel configuration section. Then execute setup upgrade and static content deploy commands. Flush cache and check Commented Nov 19, 2019 at 13:37
  • these are already done view source shows only one js but gtmetrix shows about 127 js files Commented Nov 19, 2019 at 13:51

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.