gzuidhof/coi-serviceworker

Consider restructuring to be focused on examples with a blog-like readme?

jcbhmr opened this issue · 2 comments

jcbhmr commented

Right now this project is firmly designed around the AiO coi-serviceworker.js. I suggest instead that the readme become a "blog-like" guide on how to setup cross-origin isolation with supporting examples like "vite-vue-pwa-loader" or "html" or "html-blocking" etc.

This would probably mean the demise of the https://npm.im/coi-serviceworker idea since 👆 doesn't really lend itself to an npm package 😢

This would have the advantage of opening up the project to many different ways to demo usage of client-side COI service workers. For instance (like idea-ed above), you could have

  • a readme that outlines the scenarios you need serviceworker-based COI
  • ideas on other services like itch.io for SharedArrayBuffer-based HTML/WASM games (Unity, Godot, etc.) or Netlify or Vercel for ezpz web hosting of static or API-like apps
  • examples of how to do simple <script> tags for mostly-html apps
  • demo of how to use https://vite-pwa-org.netlify.app/ with a service worker to enable COI
  • demo of how to use this idea with a "loading service worker... pls wait" loader
  • etc.

Does this seem like a good direction to go down? 🤔 This would satisfy my desire to have a centralized "here's how to enable COI in GitHub Pages" that I could direct ppl to.

Alternative: just use a series of blog posts to walk users through like...

  • "How to enable cross-origin isolation on GitHub Pages"
  • "How to deploy your HTML5 Godot app to GitHub Pages"
  • "How to use Vite & Vite PWA to enable cross-origin isolation on GitHub Pages"
  • etc.

...which would kinda trample the idea of this package? maybe idk 🤷‍♂️

jcbhmr commented

Another idea would be to use the readme as an index-like page and keep the blog "How to $X" posts on different blog websites written by whoever (sorta like an https://awesome.re/ list) with a bunch of self-contained examples in the repo itself?