Minify and Merge JS in Magento 2.x
- Minify an merge JS will be more helpful in website performance level.
- Magento2.x is having the admin option to minify and merge the JS from admin configuration.
- We have to make status as Yes.
- After change the status, clear cache , run setup static content deploy once with necessary folder permission.
- Minify JS : This will remove unwanted code from the JS file’s.
- Merge JS : This will merge all the JS files together as single file. Due to this HTTP request count will reduce.
- Note: In case if the JS script was wrong in any one of the file then your minify and merge JS will not work as expect.
- First we have to resolve other wise system itself will broken.
How to Enable:
Admin – Stores – Configuration – Advanced – Developer