In version 10, when I had to use any external library, I used it as:
$.getScript("url of cmd",function(){
});
And that library was accessible throughout the code. But same is not happening in v11. I had to reinitialise the cdn and that too in a way that the code should be within the cdn’s function like this :
$.getScript("url of cmd",function(){
//my code here
});
Is there any other way for v11 to use cdn libraries as sometimes its frustrating that if you want to use any library let say select2 at two places, then you had to call that 2 times. Just need to know a permanarn solution to initialise library once and use throughout.
I can see in console that those libraries are loaded if initialised on start in custom script but doesn’t gets called if my code needs that library after some other block of codes. Happening in v11, but was running perfect in v10