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

Avatar

Avatar

VitthalaShiva

Avatar

VitthalaShiva

VitthalaShiva

22-07-2020

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

ClientLibs osgi

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

berliant

Employee

Avatar

berliant

Employee

berliant
Employee

22-07-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

Answers (2)

Answers (2)

Avatar

Avatar

Albin_Issac

MVP

Avatar

Albin_Issac

MVP

Albin_Issac
MVP

22-07-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#.Xxg...

 

Regards

Albin I

www.albinsblog.com

 

 

 

Avatar

Avatar

Vaibhavi

MVP

Avatar

Vaibhavi

MVP

Vaibhavi
MVP

22-07-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.