stackblitz / tutorialkit

TutorialKit by StackBlitz - Create interactive tutorials powered by the WebContainer API
https://tutorialkit.dev
MIT License
460 stars 43 forks source link

Add hosting config file(s) to project scaffolding #234

Open sulco opened 2 months ago

sulco commented 2 months ago

Is your feature request related to a problem?

Because of CORS headers, deploying TutorialKit requires additional settings for each hosting provider.

Although we document that in https://tutorialkit.dev/guides/deployment/, not everyone reads the manual;) and I've heard feedback from users who'd tripped over the deployment story because of that.

Describe the solution you'd like.

With configuration files dedicated to the most common hosting providers, we can remove friction from deploying a tutorial project, so that aspects like setting up the build command or or headers is automatically taken care of.

Additionally, having this as a step in the wizard will highlight to a user the deployment capability itself.

Describe alternatives you've considered.

We could configure all the "usual suspects" automatically, but making it an additional step in the wizard might be a better option as it will reduce the unnecessary files generated.

Additional context

We can start with Vercel, Netlify and Cloudflare Pages to cover the range we have in our docs: https://tutorialkit.dev/guides/deployment/

AriPerkkio commented 2 months ago

If we could detect when these CORS errors happen, maybe we should show huge error modal on the UI?