This tutorial will show you how to merge and minify JavaScript files in Magento 2 store. Please follow below steps to merge and minify JavaScript files in Magento 2.

1) Log in to Magento 2 using your admin account.
2) From left sidebar, click Stores, and then Settings -> Configuration.
3) In this page, expand Advanced section in the panel on the left and choose Developer.
4) Now select JavaScript Settings tab.
5) Set Merge JavaScript Files to Yes.
6) Set Minify JavaScript Files to Yes.

Merge-Minify Javascript Files Magento 2

5) Click on “Save Config”.
6) Clear the cache.

Thats it. Enjoy Magento 2 speed.

Mahendra Paladiya
Mahendra is a Web Developer whose passions includes web development, technical blog writing, and database management. His passion for web development pushed him into learning how to handle different platforms like Core PHP, Magento, Prestashop, WordPress, CodeIgniter, CakePHP and Oracle.