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

  • you can Easily exclude js from bundle or you can increase bundle size from etc/view.xml – Sanju Nov 19 '19 at 13:01
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.

| improve this answer | |
  • i am getting below There are no commands defined in the "config" namespace. Did you mean one of these? setup:config setup:store-config – user1799722 Nov 19 '19 at 13:29
  • Which magento version are you using? – Jaimin Sutariya Nov 19 '19 at 13:30
  • magento 2.1.5......... – user1799722 Nov 19 '19 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 – Jaimin Sutariya Nov 19 '19 at 13:37
  • these are already done view source shows only one js but gtmetrix shows about 127 js files – user1799722 Nov 19 '19 at 13:51

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.