divyas70997717
divyas70997717
13-05-2020
Hi,
JS minify is not happening in AEM 6.5.2 instance for our project. I tried with gcc (min:gcc;languageIn=ECMASCRIPT6) with Adobe Granite HTML Library Manager and also tried with default minify (min:yui). Both seems not working.
Thanks in Advance.
Ankur_Khare
MVP
Ankur_Khare
MVP
14-05-2020
Could you please try to minify your js here-
https://www.freeformatter.com/javascript-minifier.html
If it works here then we can check in aem , nor it should not work online only there must be some error in your js file, due to which you are not able to minify the js.
divyas70997717
divyas70997717
14-05-2020
Ankur_Khare
MVP
Ankur_Khare
MVP
14-05-2020
divyas70997717
divyas70997717
14-05-2020
Ankur_Khare
MVP
Ankur_Khare
MVP
14-05-2020
divyas70997717
divyas70997717
14-05-2020
The following is the error that i can see it in error.log but the error is very uncertain. Very rarely i get this.
ERROR [com.adobe.granite.ui.clientlibs.processor.gcc.impl.GCCScriptProcessor] Error setting compiler options for flags {minify=true, languageIn=ECMASCRIPT6}: No enum constant com.google.javascript.jscomp.CompilerOptions.LanguageMode.ECMASCRIPT6
DEBUG [com.adobe.granite.ui.clientlibs.impl.HtmlLibraryBuilderImpl] processing {My clientlibrary path} with processor gcc for mode min rejected.
Tried with min:yui and i could not see any errors but no result either.
Theo_Pendle
MVP
Theo_Pendle
MVP
14-05-2020
Hi @divyas70997717 ,
I see that you are trying to use ECMASCRIPT6 as an option for gcc.
"gcc" stands for Google Closure Compiler. There seems to be no ECMASCRIPT6 option for languageIn, you'll have to pick one from the following list (which I got from the documentation on GCC's GitHub page😞
ECMASCRIPT3
ECMASCRIPT5
ECMASCRIPT5_STRICT
ECMASCRIPT6_TYPED (experimental)
ECMASCRIPT_2015
ECMASCRIPT_2016
ECMASCRIPT_2017
ECMASCRIPT_2018
ECMASCRIPT_2019
STABLE
ECMASCRIPT_NEXT
ECMASCRIPT_2015 is equivalent to ES6 btw: https://www.w3schools.com/js/js_es6.asp
Hope this helps, let me know 🙂
divyas70997717
divyas70997717
14-05-2020
aemmarc
Employee
aemmarc
Employee
14-05-2020