Since enabling LockerService our components cannot load external static resource scripts anymore. To test, I created a component:
<aura:component implements="forceCommunity:availableForAllPageTypes"
access="global" >
<ltng:require scripts="/resource/JQUERY,/resource/bootstrap/js/bootstrap.min.js"
afterScriptsLoaded="{! c.scriptsLoaded}"/>
</aura:component>
...and also the corresponding sciptsLoaded controller function:
scriptsLoaded: function(component) {
console.log("scripts loaded");
}
When opening the page the console does not output the expected "scripts loaded" text. I also checked the scripts loaded by the page and verfified that "bootstrap.min.js" was not loaded:
jQuery was loaded but it might be because it was cached because the afterScriptsLoaded function was not invoked.
I also tried using the same component on a normal lightning app and it works fine (the problem is only in community pages). EDIT: Turns out LS was disabled for this app. We tried turning on LS on other standalone apps and encountered the same problem (for moment.js / fullcalendar plugin).
I understand there are some known issues on Locker Service but when can we expect a fix for this? Or in the meantime, is there a workaround?