FYI: I just pushed an update (v1.2). It adds new entrypoints for mobile, video component & video fullscreen.
I also use the official parcel-bundler release now, as they’ve fixed some stuff (like the CSP issue) and added lot more features to further improve DX.
Can this work with the developer rig? If so, you wouldnt have a “getting started” guide for getting this starter extension working with the developer rig?
Hey arnaud, That does indeed launch the extension itself hosting at localhost:8080. But when then launching the developer rig via run.cmd provided the extension does not display on the Rig.
Perhaps I am doing something wrong, are we not supposed to host the extension with the rig? I may have got my thoughts mixed here.
The rig runs the testing environment, and using the ENV variable provided loads the config data from Twitch on where to look for your extension. If you’re running your extension on localhost:8080, have you set that as the Testing Base URI in your extension settings? If you have, the next things to check would be go to the extension url and make sure it’s accessible to you and accept any invalid certificates. If you’ve done that, check the config settings in the rig to make sure that’s all correct, and the console on the dev rig for errors.
Just to chime in, the current Run script is highly tuned to getting a user to Hello World using the existing Hello World sample. If you’re looking to run your project locally, I’d recommend checking out this guide - https://github.com/twitchdev/developer-rig/blob/master/docs/MacLocal.md - it breaks down the run steps that the script is using and you can apply it to your own code. You’ll want to focus on the yarn host command.
If you have suggestions for better general scripts, happy to hear your thoughts!
I personally still have to test the rig myself. Was testing my starter repo directly on Twitch for now, but generally it should also work using the rig as @arnaudmanaranche mentioned.
Once I get to it, will update the README in my the starter repo to explain how to use it with the rig.
@mBeierl I wanted to ask you something, I saw how you structured the project (I haven’t been able to get it working yet, I’m a beginner) the question is, does it not work using react router for your links? Do you need to have a separate html for the extension like you did here for example
if (rootVideoComponent) {import("./components/VideoComponentPage/VideoComponent.js").then(VideoComponent =>
ReactDOM.render(<VideoComponent.default />, rootVideoComponent)
);
If you were to check the timestamp of this thread when you bumped it you would notice that it’s 10 months old, and is very out-dated.
The main issue with the way components are loaded in the repo from this thread is that it bundles all views together into a single bundle. Extensions are a multi-page app and should be treated as such in the build process, rather than creating a singular bundle for all views.
Ok, thank you. I did not know 10 months old was very outdated
I was not bumping it, it is a question
Anyways, I was not able to get the extensions-boilerplate working the other day, I will try again today after all I’ve read, maybe I will be able to, I need to get a react project running by Monday.
Thank you, it’s good to know that I better work on the other option, it is kind of hard for me
Yeah, I definitely recommend using the official TwitchDev repos. There’s also the extension-getting-started repo, which should give you a good intro if you’re a beginner.
The starter repo I created last year was even before the official extension rig from TwitchDev arrived. I will add an outdated note to its README and archive it on GitHub.