AEM 6.5.3 Publish - HTML Library Manager - Minify not working for Apps clientlibrary | Community
Skip to main content
Level 4
January 15, 2020
Solved

AEM 6.5.3 Publish - HTML Library Manager - Minify not working for Apps clientlibrary

  • January 15, 2020
  • 3 replies
  • 5280 views

As per best practices

 

We placed a clientlibs in the apps folder. Assigned the allowProxy={Boolean}true

Assigned a category = "testClientLib"

 

Edited a custom component in apps and added in the widget.jsp "<ui:includeClientLib categories="testClientLib" />"

 

On publish the js/css is loaded, but not minified when we set the flag in the "HTML Library Manager"

 

We do have another older category in etc/clientlibs and this js file is being 'minified' when the flag is set and not 'minified' when the flag is not set ==> ie. this is working as expected

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by sunjot16

In addition to what @user05162  suggested, you should also change your JS minification compiler from YUI to GCC.

 

The following docs may be helpful:

https://helpx.adobe.com/ca/experience-manager/6-4/sites/developing/using/clientlibs.html#UsingPreprocessors

 

3 replies

Adobe Employee
January 15, 2020

I have seen this before where the minification is not working due to compilation errors. It might be due to the yui compiler for js. So, try using gcc for js

 

Also, For detailed analysis, follow the steps below:

- Setup a DEBUG logger on "com.adobe.granite.ui.clientlibs"

- Go to <host>:<port>/libs/granite/ui/content/dumplibs.rebuild.html

- Click on invalidate cache

- Now try to load the page where you are loading the custom clientlib and AEM should try to minify it.

- You should see details about why minification is failing in the DEBUG logger setup in the first step.

antoniom5495929
Level 7
January 15, 2020

Hi,

the clientlib it's available into the page? Or you get a 404?

Because it could be that your clientlib doesn't respect the YUI policy so you don't get the minified clientlibs.

 

Let us know.

 

Thanks,

Antonio

sunjot16
Adobe Employee
sunjot16Adobe EmployeeAccepted solution
Adobe Employee
January 15, 2020

In addition to what @user05162  suggested, you should also change your JS minification compiler from YUI to GCC.

 

The following docs may be helpful:

https://helpx.adobe.com/ca/experience-manager/6-4/sites/developing/using/clientlibs.html#UsingPreprocessors