Minify JS and CSS without "CQ Html Library Manager "minify" option in configuration | Community
Skip to main content
sunily21159739
Level 2
September 22, 2020

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

  • September 22, 2020
  • 2 replies
  • 1446 views

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,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 22, 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

 

sunily21159739
Level 2
September 22, 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.

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 23, 2020

You can follow the configuration on how AEM Project Archetype has been implemented. They have good samples on how you can get yourself set up, https://github.com/adobe/aem-project-archetype/tree/master/src/main/archetype/ui.frontend.general