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

Webpack vs Clientlibs - internals of how clientlib works

pmminov
Level 1
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
kautuk_sahni
Correct answer by
Employee
Employee

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

View solution in original post

2 Replies
kautuk_sahni
Correct answer by
Employee
Employee

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

smacdonald2008
Level 10
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