Expand my Community achievements bar.

SOLVED

AEM 6.5 Default minification not working for JS

Avatar

Level 1

When i am enabling minify from OSGI config HTML client library manager, minify option is set with jsProcessor= min:gcc. But when after clearing the cache & Rebuild Client libraries, .min.js extension is added to the JS files, and some whitespace its removed, but not actual minification is happening. And  some of the files are still not minified, they are just loading with .min.js extension, and the content is same as it is present in .js file. Can you please help me to resolve this issue ?

I already have tried with multiple configurations for jsProcessor, but didn't work.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

hi @snjkhandelwal2 ,

 

Can you try below value for jsProcessor property at your clientlib level.

   
jsProcessor="[min:gcc;languageIn=ECMASCRIPT_2016;languageOut=ECMASCRIPT_2016;compilationLevel=simple;obfuscate=true]"
 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

hi @snjkhandelwal2 ,

 

Can you try below value for jsProcessor property at your clientlib level.

   
jsProcessor="[min:gcc;languageIn=ECMASCRIPT_2016;languageOut=ECMASCRIPT_2016;compilationLevel=simple;obfuscate=true]"