Using Admin
To enable CSS merging or minification, go into the Admin > Stores > Setting > Configuration > Advanced > Developer > CSS Settings.
Using the command line
To enable CSS merging in Adobe Commerce on cloud infrastructure:
-
Run this command locally:
bin/magento config:set --lock-config dev/css/merge_css_files 1
-
Commit changes to the
app/etc/config.php
file and redeploy.
To enable CSS minification in Adobe Commerce on cloud infrastructure:
-
Run this command locally:
bin/magento config:set --lock-config dev/css/minify_files 1
-
Commit changes to the
app/etc/config.php
file and redeploy.
Minify JS files
Using Admin
On the Admin sidebar, go to Stores > Settings > Configuration > Advanced > Developer > JavaScript Settings.
Using the command line
To enable JS minification in Adobe Commerce on cloud infrastructure:
-
Run this command locally:
bin/magento config:set --lock-config dev/js/minify_files 1
-
Commit changes to the
app/etc/config.php
file and redeploy.
Merge and bundle JS files
You can turn on merging or bundling in the Commerce Admin (merging and bundling cannot be enabled at the same time): Stores > Settings > Configuration > Advanced > Developer > JavaScript Settings.
You can also enable Adobe Commerce built-in bundling (basic bundling) from the command line:
php -f bin/magento config:set dev/js/enable_js_bundling 1