Replies: 4 comments 1 reply
-
Neat idea, if it's not maintained or you have extra ideas (I liked those ideas, good to have them all in a minimal way). then let me know so I can create the repo for you as tinycoi. Thank you so much, I'm looking forward to this project. I'd need it in some places. |
Beta Was this translation helpful? Give feedback.
-
@userquin Maybe you'd be interested in discussing this since you're working on vite-plugin-pwa. |
Beta Was this translation helpful? Give feedback.
-
Hi @jcbhmr, I don't know what gave you the impression that the library is unmaintained. I would propose to first aim to improve the existing project before forking. I am happy to accept pull requests that improve on it. The project is definitely minimal, but that is very much on purpose: I imagine most people's usecase is to quickly add it to their HTML page in Github Pages and be done with it - it suffices for that. On the pain points:
As for the improvements:
I hope that is useful feedback - I would propose to make issues in |
Beta Was this translation helpful? Give feedback.
-
Since it seems like things are happening in https://github.com/gzuidhof/coi-serviceworker, I think my idea here has been rendered redundant! 😊 Yes! This was the best outcome: improve the existing project. |
Beta Was this translation helpful? Give feedback.
-
I don't know if this is "library" enough for @tinylibs, but an idea that I would be willing to spearhead is a "tiny service worker to enable client-side cross-origin isolation" to let GitHub Pages and other no-header webpages use SharedArrayBuffer and friends. Basically a zero-config no-effort service worker that adds Cross-Origin-* headers to most requests
There's already an existing project https://github.com/gzuidhof/coi-serviceworker, but it seems a bit outdated. If the maintainer @gzuidhof is still maintaining the project, then it'd probably be better to just improve the existing project rather than start a new one.
In particular, these are some of mine and others' pain points with the current https://github.com/gzuidhof/coi-serviceworker version:
window.document.currentScript is null
error in gh-pages gzuidhof/coi-serviceworker#11<script>
tagBasically, I want to improve it 😊
Here's some ideas of what using this fictitious tinycoi lib/app/utility/helper might look like:
idea 1. pretty much same as existing, just ESM
idea 2. use
<plaintext>
/<template>
+ document.documentElement.hidden trick to hide everything behind a loading spinner until service worker registeredidea 3. insert some code via a bundler! can combine with idea 1 or 2
Context (why I'm interested in improving the existing solution): I want to be able to show off SharedArrayBuffer-dependent benchmarks for tinylet using tinybench in GitHub Pages and/or on my localhost:3000 server without much confiuration
TLDR: is the https://github.com/gzuidhof/coi-serviceworker still maintained? if not, is this @tinylibs org's mission a good match with this project, or should this tinycoi project live under @jcbhmr or somewhere else? Now that I actually look at the text I just wrote, I think best option is for @jcbhmr to make something and then transfer it to @tinylibs once it works? Is that the kind of workflow you want #3 ? idk
Beta Was this translation helpful? Give feedback.
All reactions