How To Enable/Disable JS/CSS Minification/Merge In Production Mode – Magento 2

In production mode developer option are not available in Admin -> Store -> Configuration -> Advanced. We can use the below Magento commands to enable/disable the JS/CSS minify/merge

Enable JS merge: php bin/magento config:set dev/js/merge_files 1

Enable JS Bundling: php bin/magento config:set dev/js/enable_js_bundling 1

Enable JS minify: php bin/magento config:set dev/js/minify_files 1

Enable CSS merge: php bin/magento config:set dev/css/merge_css_files 1

Enable CSS minify: php bin/magento config:set dev/css/minify_files 1

To disable the JS/CSS minify/merge simply change the value of the above command from 1 to 0

#css #merge #minify #magento2 #js

689 views0 comments

Recent Posts

See All

Magento 2 CMS block with the same ID already exists

I have seen the below error when I open cms block grid something went wrong with processing the default view and we have restored the filter to its original state. I found the below log in the excepti

How to generate bearer token - Magento 2 REST API

We can generate the admin bearer token using the below command. Please run the below command in the terminal to generate a token. curl -XPOST -H 'Content-Type: application/json'

Magento 2 script tag and available options in layout xml

We can add a script via layout XML file in Magento 2. The below format will stop the HTML parse until js downloaded and executed. <script src="Bilal_Usean/js/sample.min.js" /> The below format will st