Expand my Community achievements bar.

SOLVED

JS minify in AEM 6.5

Avatar

Level 3

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. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

6 Replies

Avatar

Employee Advisor

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

Avatar

Level 3

Thank you @nitesh_kumar 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.

Avatar

Community Advisor

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.

Avatar

Correct answer by
Community Advisor

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