JS minify in AEM 6.5 | Community
Skip to main content
New Participant
March 14, 2023
Solved

JS minify in AEM 6.5

  • March 14, 2023
  • 5 replies
  • 4326 views

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.
Best answer by Bhuwan_B

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

5 replies

DEBAL_DAS
New Participant
March 15, 2023

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.

Bhuwan_B
Bhuwan_BAccepted solution
New Participant
March 14, 2023

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

arunpatidar
New Participant
March 14, 2023
TarunKumar
New Participant
March 14, 2023

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.

nitesh_kumar-1
Employee
March 14, 2023

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

user00181Author
New Participant
March 14, 2023

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.