Clientlibs load Issue when Experience Fragment is Exported to target and added on AEM page through Target.
HI,
We are facing a issue where same client library is getting loaded twice on the page through the content Added from Target on the page. This leads to breaking of few functionalities on the page. Below I have explained the scenario in details.
AEM page has one client library. (/etc.clientlibs/mysite/component.js)
One component is authored inside Experience fragment and that is exported to target. Same is included on a page as a Target offer.
That component also has same clientlibrary inclusion. (/etc.clientlibs/mysite/component.js)
When the Target offer is added on the page same client libraries gets loaded twice on the page. First One directly from AEM page itself and second one through target.
In normal use case if same client library is included twice as part of 2 different components on AEM page then it gets included only once. Same doesn't happen in the use case mentioned above.
Has anyone faced similar issues? Can you please guide me how to deal with this issue.