Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

karthik-elumalai
Level 2
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
Asutosh_Jena_
Correct answer by
Community Advisor
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

0 Replies
Asutosh_Jena_
Correct answer by
Community Advisor
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

Shubham_borole
Community Advisor
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... ?

kishorekumar14
Level 9
Level 9

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/ 

kchaurasiya
Level 6
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