Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Webpack vs Clientlibs - internals of how clientlib works

Avatar

Level 1

Hi,

My frontend team is NOT eager on using clientlibs. They want to work with their more casual and fast approach of using Webpack. I am not very clear on its working, but basically you can develop css and js on a modular basis and webpack will return you a nice big JS/CSS file with all optimizations ran in it. They also like the fact they can use SASS with Webpack.

I would like to stick to using clientlibs, which pretty much can do the same (group components css/js files and deploy one big minified clientlib). But I can't really come up with a good reason to back it up.

The information on clientlibs is limitied to a one html document, could someone share a bit more technical details of how all the client lib happens? What libraries are involved in the process? Has anyone been posed with the same question of tossing clientlibs in favor of a big massive compiled/optimized JS/CSS File?

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi 

Please have a look at this community article, this talks about :

1.multiple components with their own Javascript and CSS files

2. global Javascript and CSS files

So here, you can learn to create a component specific javascripts/css and global javascripts/css.

Link:- http://blogs.adobe.com/experiencedelivers/experience-management/clientlibs-explained-example/

Read the above article to learn step by step approach to create a component specific JS.

I hope this would help you a bit

~kautuk



Kautuk Sahni

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

Hi 

Please have a look at this community article, this talks about :

1.multiple components with their own Javascript and CSS files

2. global Javascript and CSS files

So here, you can learn to create a component specific javascripts/css and global javascripts/css.

Link:- http://blogs.adobe.com/experiencedelivers/experience-management/clientlibs-explained-example/

Read the above article to learn step by step approach to create a component specific JS.

I hope this would help you a bit

~kautuk



Kautuk Sahni

Avatar

Level 10

Adding to what Kautuk said - ClientLibs are best practice to use when workign with AEM. See:

http://www.icidigital.com/blog/best-approaches-to-client-libraries-in-adobe-cq5-part-1/

I have not heard of using Webpacks with AEM. I recommend using best practice and use Clientlibs. 

Hope this helps