Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

ClientLib minification issue

test1234567
Level 2
Level 2

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.

11 Replies
test1234567
Level 2
Level 2

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

Arun_Patidar
Community Advisor
Community Advisor

try with

min:gcc;obfuscate=true;languageIn=ECMASCRIPT_2015

asutosh_jena
Community Advisor
Community Advisor

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! 

test1234567
Level 2
Level 2

@asutosh_jena - I just tried with the provided option as well but I still don't see the minificaion on the clientlib.

test1234567
Level 2
Level 2

@asutosh_jena - It is happening for min:yui but we would like to use gcc as yui is deprecated.

asutosh_jena
Community Advisor
Community Advisor

Is it failing on any specific file? Did you check if the file contains any specific keyword which is causing it to fail?

test1234567
Level 2
Level 2

@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"

test1234567
Level 2
Level 2

@asutosh_jena - Instead of changing this reference, is there a way to specify the languageIn, languageOut options to handle this scenario.