Can we minify individual Client side Libraries | Community
Skip to main content
JakeCham
Level 6
Mar 15, 2021 3:51 PM UTC
Solved

Can we minify individual Client side Libraries

Hi Team,

I'm trying to load a client library using a helper template provided by AEM.I want to minify this js/css.

When I go to /system/console/configMgr there is a option to minify all the clientlibs folders by using Library manager. But I want to do it for individual clientlibs folders.Is there any way to achieve this ?

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Mar 15, 2021 6:15 PM UTC

Yes this is possible. For YUI COMPRESSOR FOR CSS MINIFICATION AND GCC FOR JS, refer to Adobe's own documentation, https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/clientlibs.html#UsingPreprocessors

 

 
 

6 replies

Nikhil-Kumar
New Participant
Mar 18, 2021 1:52 PM UTC
BrianKasingli
BrianKasingliAccepted solution
New Participant
Mar 15, 2021 6:15 PM UTC

Yes this is possible. For YUI COMPRESSOR FOR CSS MINIFICATION AND GCC FOR JS, refer to Adobe's own documentation, https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/clientlibs.html#UsingPreprocessors

 

 
 
Translate
Asutosh_Jena_
New Participant
Mar 15, 2021 4:39 PM UTC

Hi @jakecham 

Using "Adobe Granite HTML Library Manager" config you will be able to minify all the CSS/JS files and can exclude the files which all are available under a specific path.
You can keep all the clientlibs which you do not want to minify under a specific path and add that path into "htmllibmanager.excluded.path.list" property so that it can be skipped during the minification.

On a separate note, it is always recommended to minify the CSS/JS files to improve the page performance and security.

https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.html?lang=en#configuring-library-handling-for-development-and-production
http://www.sgaemsolutions.com/2017/07/adobe-granite-html-library-manager.html

Thanks!

Translate
Employee
Mar 15, 2021 4:13 PM UTC

Yes, you can achieve that by Add the multivalue properties cssProcessor and jsProcessor on the clientlibrary node. See [1] for more details

 

[1] https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.html?lang=en#usage

 

Translate
JakeCham
JakeChamAuthor
Level 6
Mar 15, 2021 4:26 PM UTC

Hi @user05162

I have already tried to add jsProcessor String[] min.gcc.It still didn't work ?I'm checking this in view as publisher. Not in dispatcher or publisher instance since my local I have configured only author instance.

Translate
Bhuwan_B
New Participant
Mar 15, 2021 3:59 PM UTC