Welcome to Tech Mastery, your expert source for insights into technology and digital strategy. Explore topics like Adobe Experience Manager, AWS, Azure, generative AI, and advanced marketing strategies. Delve into MACH architecture, Jamstack, modern software practices, DevOps, and SEO. Our blog is ideal for tech professionals and enthusiasts eager to stay ahead in digital innovations, from Content Management to Digital Asset Management and beyond.
How to Disable the Minification for specific client libraries(Java Script/CSS) in AEM
Minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser — e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on.
Minfication helps to reduce the size of the resources(Java Script and CSS) and improves the performance of page loading.
Sometimes we may required to disable the minifcation for specific Java script files may be due to the files are already minified or the issue with minification process.
There are two options to disable the minification for Java Scripts and CSS in AEM
Disable through Adobe Granite HTML Library Manager — Disable the minification globally for JS and CSS, this will impact all the client libraries in the system(both default and custom)
Disable Minfication for specific client libraries — Disable the minification for specific client library — JS/CSS, this will impact only the specific client library where this configuration is enabled.
Disable through Adobe Granite HTML Library Manager
Un-select minify option in Adobe Granite HTML Library Manager through configMgr(http://localhost:4502/system/console/configMgr/com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl)
Please note this is a global configuration and it will impact all the client libraries, non of the client libraries will be minified now and this will impact the performance. This approach is not recommended as this will disable the minification for all the custom and default system level client libraries.
To disable CSS Minification — add cssProcessor String[] default:none, min:none
Disabling the minification at global level is not recommended as this will impact the over all impact the website performance, enable the configurations to required client libraries to disable the minification for JS/CSS.