JS minify in AEM 6.5 | Community
Skip to main content
Level 2
Mar 14, 2023 6:47 AM UTC
Solved

JS minify in AEM 6.5

Hi All,

 

I have enable minify js processor in my project at  /system/console/configMgr (Adobe Granite HTML Library Manager) but it is not working for all js files some of js files are minifying but some of js files are not minifying.

I have also add directly some properties For client library folder, add: jsProcessor=[min:gcc;obfuscate=true;languageIn=ECMASCRIPT_2019;languageOut=ECMASCRIPT3 but still file is not minify.

 

Please could anyone suggest some solution for this issue.

 

Thanks. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Bhuwan_B
Bhuwan_BAccepted solution
New Participant
Mar 14, 2023 9:23 AM UTC

@user00181 Once you enable minify option in HTML Manager Configuration.Try restarting the bundle Adobe Granite UI Clientlibs com.adobe.granite.ui.clientlibs  by stop/start and validate if that helps (Clear browser cache before testing).

6 replies

DEBAL_DAS
New Participant
Mar 15, 2023 10:45 AM UTC

You can refer this https://medium.com/@debal.india2014/aem-clientlib-minification-issue-and-how-to-debug-f3420542f9ea , hope this will help you to debug and fix the issue.

Translate
Bhuwan_B
Bhuwan_BAccepted solution
New Participant
Mar 14, 2023 9:23 AM UTC

@user00181 Once you enable minify option in HTML Manager Configuration.Try restarting the bundle Adobe Granite UI Clientlibs com.adobe.granite.ui.clientlibs  by stop/start and validate if that helps (Clear browser cache before testing).

Translate
arunpatidar
New Participant
Mar 14, 2023 9:08 AM UTC
TarunKumar
New Participant
Mar 14, 2023 8:38 AM UTC

Hi @user00181 .

This might happen due to some processor not identifying the syntax of particular js file. These issue can be traced in log file. Once you find the syntax which are not compatible you can amend it.

Translate
nitesh_kumar-1
Employee
Mar 14, 2023 8:14 AM UTC

Hi @user00181 ,

 

Check if you are getting some error in the logs for those files, the processors within AEM might not be familiar with that syntax so it would throw a warning/error.

 

You could use webpack-based plugins in your FE module to minify them in advance.

 

Hope that helps!

 

Regards,

Nitesh

Translate
user00181Author
Level 2
Mar 14, 2023 8:42 AM UTC

Thank you @nitesh_kumar-1 for reply. I have already checked log file i didn't find any error or warning in log. My project is working fine.

 

For testing I had changed one JS file in that i have change let variable to var and then refresh the page after that for that js file minify is working.

 

Thanks.

Translate