Minification enabled in AEM but not able to find content minification difference between min and actual js | Community
Skip to main content
New Participant
August 18, 2021
Solved

Minification enabled in AEM but not able to find content minification difference between min and actual js

  • August 18, 2021
  • 4 replies
  • 2307 views

Hi,

 

There is minification enabled in AEM, but while checking content of minified js, I could see non minified content I means its same as actual js file seems its not minified. kindly help us to debug this issue.

 

Please note we are re build the clientlibs, there is no syntax errors.

 

Thanks in advance!

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

Hi @karthik-elumalai 

 

This issue normally occurs when there is a syntax issue or any plugin has some code which the compiler is not able to minify.

If you are sure that there is no syntax error in the code, then I will suggest you to remove all plugins from the clientlib and check the minification by adding one one file and it will help you to find the file which is causing the issue.

 

Hope this helps!

 

Thanks!

4 replies

kchaurasiya
New Participant
August 18, 2021

@karthik-elumalai Please check whether you added the below properties with your client-libs. It is working as expected once adding the below properties in client-lib. 

 

Thank You.

Keshav

Kishore_Kumar_
New Participant
August 18, 2021

Hi @karthik-elumalai  ,

 

Are you using ES6 JS (like a let keyword anywhere) in your script ? If yes please check this document to resolve it.


http://www.shsteimer.com/2018/11/29/aem-clientlib-gcc-compiler-options/ 

Shubham_borole
New Participant
August 18, 2021

There could be some syntax error/issue that is preventing the minification.

Can you please share your OSGi configuration for this? 
Also can you check the issue mentioned here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-2-js-files-are-not-minified-with-gcc-and-yui/td-p/362173 ?

Asutosh_Jena_
Asutosh_Jena_Accepted solution
New Participant
August 18, 2021

Hi @karthik-elumalai 

 

This issue normally occurs when there is a syntax issue or any plugin has some code which the compiler is not able to minify.

If you are sure that there is no syntax error in the code, then I will suggest you to remove all plugins from the clientlib and check the minification by adding one one file and it will help you to find the file which is causing the issue.

 

Hope this helps!

 

Thanks!