Hey!
So, I’m trying to build my first twitch extension and as a starter I have some questions that after some time of research I couldn’t find the answer for.
-
I’ve seen that to upload my extension to the hosted test, I can’t zip the folder itself and instead I need to zip the files. But can I create subfolders for my frontend such as js/ or css/ to organize my files and zip them or do I need to leave all .js and .css in the same folder as the .html?
-
After uploading the files to the hosted test, I get the following error on the console when configuring the extension:
Refused to load the script 'https://code.jquery.com/jquery-3.3.1.min.js' because it violates the following Content Security Policy directive: "script-src 'self' https://w1ftsfbmgyeebwfa503m3gwv5ayd4t.ext-twitch.tv https://extension-files.twitch.tv https://www.google-analytics.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
And then since it couldn’t import jQuery, after that I get errors from the “$” in the code. Why is that happening?
I import this file in the html’s the same way the example I downloaded does
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
-
This is a bit of a silly question but for the backend.js, do I need to upload it to twitch together with the frontend or do I need it in my own server?
Thanks a lot!