-
-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
Hi, Qwik core member here 👋
Now that qwik does not use a service-worker by default anymore (it uses <link rel="modulepreload">
instead), I am exploring how we can provide easy service worker, pwa, offline support, and more. This plugin seems like a logical choice.
Are you open to including Qwik support in this repo? I can work on a PR.
Qwik is usually SSR or SSG (through Qwik City). I have been able to hack around the plugin a little and it almost works for offline mode in preview:
- if I manually add this inline script I can get the js bundles and assets to be cached (using a somewhat default qwikPWA config)
<script dangerouslySetInnerHTML={`if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/sw.js', { scope: '/' })})}`} />
- but I'm unable to cache the html files whether I'm on an SSR (in preview) or SSG build.
I'd appreciate some hints into what needs to be done if you can :).
Metadata
Metadata
Assignees
Labels
No labels