7

Can anyone see why the below manifest (truncated for brevity) is producing:

could not load javascript '' for content script

{
    ...
    "content_scripts": [{
        "matches": ["<all_urls>"],
        "js": [
            "https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.22/fabric.min.js",
            "assets/js/content-script-curr-tab.js"
        ]
    }],
    ...
    "content_security_policy": "object-src 'self'; script-src 'self' https://apis.google.com https://cdnjs.cloudflare.com"
    ...
}

If I remove the reference to the Cloudflare script, it loads, yet I've clearly whitelisted the Cloudflare CDN in the content security policy.

mplungjan
  • 169,008
  • 28
  • 173
  • 236
Mitya
  • 33,629
  • 9
  • 60
  • 107
  • 4
    It [seems the preferred thing to do](https://stackoverflow.com/questions/20287806/how-to-use-jquery-from-jquery-coms-cdn-into-a-chrome-extension) is to package all your dependencies within your extension. Remembering that an extension is installed locally, loading resources from a CDN will actually result in _slower_ loading than bundling them. (It's also not clear to me if Chrome will even cache those assets.) – msanford Jul 10 '18 at 14:48

0 Answers0