As per documentation, we can use external resource as: <ltng:require styles="{!$Resource.resourceName}" />

We have added bootstrap and jQuery in our component. But today morning it suddenly stopped working and jQuery is not being loaded. (Please note that I have activated Locker services a week ago..not today)

<script data-locker-src="/resource/***/***/script/jquery-2.2.4.js" >

As we can see, src is changed to data-locker-src. When I inspect element and update it as 'src' it's again started working.

Any suggestion!!

  • Spring '17 maybe. Check the release notes.
    – S..
    Jan 9, 2017 at 8:47
  • Check this link salesforce.stackexchange.com/questions/131438/…
    – Saroj Bera
    Jan 9, 2017 at 9:55
  • Sorry guys, actually Spring ''17 enabled CSP- so we will not be able to use jquery externally from header but jQuery is available if you use in controller.js. My problem is I am using bootstrap which requires jQuery but as jQuery is running internally - boostrap.js is not able to find jQuery and throwing error...Bootstrap require jQuery.............
    – Ayub
    Jan 9, 2017 at 10:46
  • 1
    Have you tried loading multiple resources as outlined in this document?
    – sfdcfox
    Jan 9, 2017 at 12:46


You must log in to answer this question.

Browse other questions tagged .