Expand my Community achievements bar.

SOLVED

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

Avatar

Level 2

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!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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!

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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!

Avatar

Community Advisor

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... ?

Avatar

Community Advisor

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/ 

Avatar

Level 6

@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. 

 

kchaurasiya_0-1629302453706.png

kchaurasiya_1-1629302492408.png

Thank You.

Keshav