How to Minify Clientlib individually instead of checking the input in OSGI config | Community
Skip to main content
VitthalaShiva
Level 2
July 22, 2020
Solved

How to Minify Clientlib individually instead of checking the input in OSGI config

  • July 22, 2020
  • 3 replies
  • 1928 views

I am having an issue with minifying a clientlibs. In our project I want to minify a clientlib and not willing to change the OSGI configuration.

 

Please help me if there is any way to minify Individual Clientlibs.

 

Thanks

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 leoberliant

You can create a minified version of your libs outside of AEM and deploy it along with your project. 

Although, it will limit an ability to recompile libs at runtime

3 replies

leoberliantAdobe EmployeeAccepted solution
Adobe Employee
July 22, 2020

You can create a minified version of your libs outside of AEM and deploy it along with your project. 

Although, it will limit an ability to recompile libs at runtime

Vaibhavi_J
Level 7
July 22, 2020

Hi @vitthalashiva , 

For better performance, minification of clientlib is better option to do. Am not sure why you are not willing to update the config. But I would suggest you to enable minification in osgi itself. 

 

If you still need to individually do minification of clientlib without osgi option, you need to use third party tools to minify the clientlib and add it in codebase or custom code to achieve the same. 

 

I would suggest you to enable the config in osgi which pretty straightforward and good option to go ahead. 

VitthalaShiva
Level 2
July 22, 2020
Thanks Berliant, Vaibhavi, we have some clientlibs which are really huge and other clientlibs are working good and not planning to minify them. I thought if there is any way to minify only certain clientlibs.
Community Advisor
July 22, 2020

You can control the minification of individual client libraries, refer the following URL for more details - https://www.albinsblog.com/2019/04/how-to-disable-minification-for-client-libraries-in-aem.html#.Xxg792hKg2w

 

Regards

Albin I

www.albinsblog.com

 

 

 

VitthalaShiva
Level 2
July 22, 2020
Thanks @vaibhavi_j, @albinis1, @leoberliant I will try the solutions / suggestions mentioned by you.