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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Level 2

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

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

6 Replies

Avatar

Correct answer by
Employee

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

Avatar

Community Advisor

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. 

Avatar

Level 2
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.

Avatar

Community Advisor

Minification of smaller clientlib also add on improvement on load. 

If debugging is am concern, you can still choose an option to do minification towards publisher side in case if you do not need to minification in author. 

Avatar

Community Advisor

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