Removing unwanted clientlibs in Publish for experience fragment

viki1101

16-07-2020

Hello All - I am using experience fragment in AEM 6.5. Below files are not required but they get added in the publish instance even if it is not part of my include clientlib category. This is causing unwanted network calls. In my custom component, it is pointing to sling:resourceSuperType:cq/experience-fragments/components/xfpage. Could someone help with this please?

 

/etc.clientlibs/clientlibs/social/thirdparty/underscore.min.js
/etc.clientlibs/clientlibs/granite/moment.min.js
/etc.clientlibs/clientlibs/social/thirdparty/backbone.min.js
/etc.clientlibs/clientlibs/social/thirdparty/handlebars.min.js
/etc.clientlibs/clientlibs/social/commons/scf.min.css
/etc.clientlibs/clientlibs/social/commons/scf.min.js
/libs/social/integrations/livefyre/components/authorcomponents/shared.min.js
/libs/social/integrations/livefyre/components/authorcomponents/authorclientlibs.min.js
/libs/cq/ui/rte.min.js
/libs/cq/ui/widgets.min.js
/etc.clientlibs/cq/personalization/clientlib/personalization/integrations/commons.min.js
/etc.clientlibs/cq/analytics/clientlibs/sitecatalyst/tracking.min.css
/etc.clientlibs/cq/analytics/clientlibs/sitecatalyst/tracking.min.js
/etc.clientlibs/cq/searchpromote/clientlibs/searchpromote.min.css
/etc.clientlibs/cq/searchpromote/clientlibs/searchpromote.min.js
/libs/cq/searchpromote/widgets.min.js

 

@Arun_Patidar @kautuk_sahni 

Accepted Solutions (1)

Accepted Solutions (1)

BrianKasingli

MVP

17-07-2020

@viki1101 

A simple answer for you is to create your own xfpage page component (typically in /apps/my-app/components/structure/xfpage, overlaying the /libs xfpage page component, and removing the fluff. 

Since you are referencing and using the out of the box xfpage component, the out of the box xfpage component is trying to resolve the clientlib category of "cq.experience-fragments.web", within custom headlibs. Also taking a look at the content.html, another reference to a clientlib category is referenced "cq.experience-fragments.content". As you can see, the page component is trying to resolve multiple unwanted clientlibs. To resolve your issue, you can create your own xfpage page component. 

xfpage path - http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage

xfpage content.html path - http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage/content.html

xfpage customheaderlibs.html path -http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage/customheaderl...

I hope this helps.

Answers (1)

Answers (1)

Arun_Patidar

MVP

17-07-2020

Hi,

Are these js/css are getting added in all of the page? Can you check the dependencies property of of your project clientlibs?