Overriding version of jQuery when using Target
Hi
It's been nearly 5 years since this question : https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/jquery-conflict-in-aem-6-4/m-p/303705#M36151
We still have the same problem - AEM insists on loading the 'jquery' clientlib when you add things like Target integration to your pages. This results in jQuery v1.12.4-aem being loaded, which is really rather old.
The workaround, as described in the answer to the earlier question is to create your own clientlib which loads a newer version of jQuery, and to make your clientlib depend on the AEM jquery clientlib (so the AEM version loads before yours), and to make sure you load that before anything that requires jQuery. The end result is then that the version of jQuery you want to use is loaded, and because of the way clientlibs work, there's no further attempt to load v1.12.4-aem.
However, the downside of this is that the browser requests, downloads, and parses a version of jQuery that is never used.
Does anyone have a better, more performant approach to this issue?
As an example, this is what happens if you add Target via Cloud Services if you don't somehow trick AEM by loading the OOTB 'jquery' clientlib earlier in the page.

