Closed stefnotch closed 2 years ago
I just tried out https://github.com/antfu/vite-plugin-pwa . It would probably be pretty easy to get it to work, but with ~200 extra dependencies, I'm not sure if we want to use it.
Okay, using Workbox is also a bit irritating, because it ships as a ES module, but Firefox doesn't support modules in workers. While the linked issue talks about web workers, the same stuff applies to service workers.
Not sure how much work implementing it ourselves would be. If we do, we could probably take quite a lot of code from vite-plugin-pwa
(appropriately licensed, of course)
I have a PWA Prototype up and running, look at this branch
Here is my gh-pages deployment https://fancy11111.github.io/tgi-pages/#/
Works quite nicely. Though, KaTeX and Monaco aren't cooperating as well as they should.
Alrighty, fixed it!
To also document this here, the PWA had the nice side effect that we have a "desktop" variant as well.
Which makes the PWA feature close this, and #82
I'll close this for now
Either with an approach like #82 or with service workers/PWAs