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 call Vendor in clientlibs

Avatar

Level 5

Hi, 

I have some separate css, js and bootstrap icons for my component. Those I have stored under vendor folder like the below. How can I call the below folder in my HTL (for my component) or should I add these to clientlib-base, if so how to add and call them ??

VanithaB1_0-1646035863388.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi @Tessa_learner1 ,

Looks like each folder under the vendor folder is a separate clientlib folder. In this case, you can use dependencies concept to include these client libs into you base clientlibs. And I assume your base clientlibs must be included in the base page. You have to add a property named "dependencies" in your clientlib-base folder and add all the category names as an array. dependencies support multivalues. 

Refer this to understand more about dependencies and embed which will be used in these cases:https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.htm...

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @Tessa_learner1 , You already answered you question 🙂

We cannot include clientlibs in HTL without categories. You can create a new clienlib folder under apps/your-site/clientlibs and give it a category like vendor-clientlibs, and then bundle/send the vendor clientlibs through gulp under that location (also you can manually paste just to check once). And then include that category inside your HTL.

 

Avatar

Correct answer by
Level 10

Hi @Tessa_learner1 ,

Looks like each folder under the vendor folder is a separate clientlib folder. In this case, you can use dependencies concept to include these client libs into you base clientlibs. And I assume your base clientlibs must be included in the base page. You have to add a property named "dependencies" in your clientlib-base folder and add all the category names as an array. dependencies support multivalues. 

Refer this to understand more about dependencies and embed which will be used in these cases:https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.htm...