All separate CSS files and JavaScript files can be merged into one file which helps to optimize your site and reduce page load time. After merging, a merged CSS file or script file will be displayed without line breaks and you will not be allowed to modify the file.
To enable Merge CSS, JavaScript in Magento 2 you can follow some simple steps mentioned below.
How to enable Merge CSS, JavaScript in Magento 2
- Merge CSS file in Magento 2
- Merge JavaScript in Magento 2
Merge CSS file in Magento 2
In the Admin Panel, click on Shops . In the Settings section , select Configuration .
Select Developer in the Advanced section in the left panel
Open the CSS Settings section and continue with the following:
In the Merge CSS File field , select Yes
When finished, click Save config .
Merge Javascript files in Magento 2
In the Admin Panel, click on Shops . In the Settings section , select Configuration .
Select Developer in the advanced section in the left panel
Open the JavaScript Settings section and continue with the following:
In the Merge JavaScript File field , select Yes
When finished, click Save config .
Free 30-days trial Hosting Fast, Secure and Optimized
Switch to Bhoost with 30 days free and migration included
Free 30-days trial