Hello Community - I see some issues with the clientLib minification in the JS. This is happening only for few of the clientLibs and for other clientLibs in the same project is working fine without any issues.
After enabling the debug logs, I found that there are some issues with minification for the spcecific clientlib failed with the error "with processor gcc for mode min rejected". Even though it failed with some errors for the minification, I am able to minify the JS using online utility(https://closure-compiler.appspot.com/home, https://javascript-minifier.com/) without any errors.
Error:
com.adobe.granite.ui.clientlibs.processor.gcc.impl.GCCScriptProcessor Processed /etc/designs/testapps/testClientlibs.js. 5 error(s), 0 warning(s)
13.08.2021 13:55:19.616 *DEBUG* [10.129.38.226 [1628880917365] GET /etc/designs/testapps/testClientlibs.min.js HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryBuilderImpl processing /etc/designs/testClientlibs/testClientlibs with processor gcc for mode min rejected.
Please let me know how can we identify and resolve the minification issues.
Views
Replies
Total Likes
Hi,
Check https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-2-js-files-are-not... if helps
@arunpatidar - Thanks for your reply. I have already followed the instructions in the provided link but no luck. is there a way to find out the errors during the minification process? It only shows the error count but not the error details.
try with
min:gcc;obfuscate=true;languageIn=ECMASCRIPT_2015
Hi @test1234567
Did you try with the below option:
jsProcessor="[default:none,min:gcc;languageIn=ECMASCRIPT_2015;compilationLevel=whitespace]"
More information here:
http://www.shsteimer.com/2018/11/29/aem-clientlib-gcc-compiler-options/
Thanks!
@Asutosh_Jena_ - I just tried with the provided option as well but I still don't see the minificaion on the clientlib.
Please try with the below:
jsProcessor="[min:yui]"
@asutosh_jena - It is happening for min:yui but we would like to use gcc as yui is deprecated.
Is it failing on any specific file? Did you check if the file contains any specific keyword which is causing it to fail?
@Asutosh_Jena_ - After enabling the debug logs, it is failing for the below.
ERROR - This language feature is only supported for ECMASCRIPT6 mode or better: const declaration. const testVar= "Test"
@Asutosh_Jena_ - Instead of changing this reference, is there a way to specify the languageIn, languageOut options to handle this scenario.