Highlighted

Minify JS and CSS without "CQ Html Library Manager "minify" option in configuration

sunily21159739

22-09-2020

Hi All,

Please suggest how can I minify my JS,CSS files without using "CQ Html Library Manager" minify option. I have don't have access to use "minify" option in the configuration. What is the alternate solutions, I am using AEM6.4.

 

 

Regards,

Replies

Highlighted

BrianKasingli

MVP

22-09-2020

In some scenarios, utilising the "CQ Html Library Manager" to minify your client library CSS and JS actually breaks your FE applications, so you can turn the "CQ Html Library Manager" off (disable) and minify the CSS and JS files during the compilation stage within the build process of your FE application.

NPM packages used to compress JavaScript and CSS files:

Javascript:

CSS:

Additionally, you can utilise Google's Page Speed NGINX or Apache Module to group-minify or minify CSS and JS files, https://developers.google.com/speed/pagespeed/module

 

Highlighted

sunily21159739

22-09-2020

HI @BrianKasingli  thanks for your response, what about "WebPack" for JS/CSS minification , is it good practice to use all these third party libraries to minify the JS/CSS.

What is the process to use these services, how can I implement with our AEM application for minify.