Magento 2 How to Enable Merge CSS JavaScript

To enable Merge CSS and JavaScript in Magento 2, you can follow given steps which we explained below. Just to add, this is one of the factor used for site optimization also which helps to improve the page performance of the website. To get the details on performance optimization, you can refer this link to improve website performance.

To merge CSS files in Magento 2:

  • In the Admin panel, click Stores. In the Settings section, select Configuration.
  • Select Developer under Advanced in the panel on the left
  • Open the CSS Settings section in the shown settings page:
  • In the Merge CSS Files field, select Yes and click Save Config button to save the configuration.

To merge JavaScript files in Magento 2

  • On the Admin panel, click Stores. In the Settings section, select Configuration.
  • Select Developer under Advanced in the panel on the left
  • Open the JavaScript Settings section, and continue with following:
  • In the Merge JavaScript Files field, select Yes and click Save Config button to save the configuration.

Hope this helps you Guys!

Leave a Reply