• Nick Butler
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I can include an external resource in my component and it will work in salesforce. However it does not work when using the component in "lightning out".

For example. This is the correct way to include a static resource javascript library. 
<ltng:require scripts="{!$Resource.FileSaver_js_zip + '/FileSaver.js-master/FileSaver.js'}" />

works just fine in salesforce.

using this component in "Lightning out". I get the error due to trying to pull in the static resource on the 'origin host' rather that my salefsorce org.

aura_proddebug.js:15863 GET https://{origin_host}/resource/1481801758000/FileSaver_js_zip/FileSaver.js-master/FileSaver.js 404 (Not Found)


Is there a work-around? If not this will be very limiting.
 
I can include an external resource in my component and it will work in salesforce. However it does not work when using the component in "lightning out".

For example. This is the correct way to include a static resource javascript library. 
<ltng:require scripts="{!$Resource.FileSaver_js_zip + '/FileSaver.js-master/FileSaver.js'}" />

works just fine in salesforce.

using this component in "Lightning out". I get the error due to trying to pull in the static resource on the 'origin host' rather that my salefsorce org.

aura_proddebug.js:15863 GET https://{origin_host}/resource/1481801758000/FileSaver_js_zip/FileSaver.js-master/FileSaver.js 404 (Not Found)


Is there a work-around? If not this will be very limiting.