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

AEM 6.5.2 JS files are not minified with gcc and yui

Avatar

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
divyas70997717
Level 2

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.

Replies

Avatar

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

151 likes

Total Posts

363 posts

Correct Reply

56 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

151 likes

Total Posts

363 posts

Correct Reply

56 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
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.

Avatar

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
divyas70997717
Level 2

14-05-2020

Thank you for your response. I tried minifying using the free formatter and it throws an error in JS files. Basically it throws an error in lines which used "let" keyword. Does min:gcc not support let?

Avatar

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

151 likes

Total Posts

363 posts

Correct Reply

56 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

151 likes

Total Posts

363 posts

Correct Reply

56 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ankur_Khare
MVP

14-05-2020

yes it wont you need to fix all these errors

Avatar

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
divyas70997717
Level 2

14-05-2020

I fixed all the errors and it works in freeformatter. But no effect in AEM and still it is not minified in AEM (version 6.5.2)

Avatar

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

151 likes

Total Posts

363 posts

Correct Reply

56 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

151 likes

Total Posts

363 posts

Correct Reply

56 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ankur_Khare
MVP

14-05-2020

check the logs and share the logs whats the error

Avatar

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
divyas70997717
Level 2

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.

Avatar

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

236 likes

Total Posts

251 posts

Correct Reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

236 likes

Total Posts

251 posts

Correct Reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
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  🙂

Avatar

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
divyas70997717
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
divyas70997717
Level 2

14-05-2020

Thank you for your response. I have already tried ECMASCRIPT_2015 and also with other options. It did not work out so i have used ECMASCRIPT6 option.

Avatar

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

183 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

183 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
aemmarc
Employee

14-05-2020

jsProcessor=[default:none,min:gcc;languageIn=ECMASCRIPT_2015;languageOut=ECMASCRIPT_2015]