-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat!: move client to @vite-pwa/workbox-window
#634
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vite-plugin-pwa-legacy ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@vite-pwa/workbox-window
@vite-pwa/workbox-window
# Conflicts: # src/client/build/register.ts
# Conflicts: # examples/vanilla-ts-no-ip/package.json # pnpm-lock.yaml # src/client/build/register.ts
Hey, it would be great if at least one of the two PRs (this one or #623) could actually land. Is there a particular reason why both PRs are stalled? If there are some major roadblocks, it would be helpful to at least expose the Workbox instance to install the events temporarily yourself. |
We need to do more tests, rn the logic is wrong, workbox-window logic in vite pwa is wrong (we reverted a commit a few months ago in pwa plugin), we are also awaiting the new Google team, no idea if workbox repo Will be finally deprecated (2 years) |
Can we at least get #623 merged for now? The PR is smaller and would help for now. |
The logic is not 100% correct, we have some "race" condition when using multiple clients (tabs or browser instances); the You can add the logic in your project if you want via |
This PR also includes
installing
event support for VanillaJS and all frameworks:onInstalling
andonUpdateFound
callbacksinstallingSW
andupdatingSW
propsI need to review if
installingSW
andupdatingSW
can be read only (when exposing them), the logic should be handled internally,installing
event is a transient event.NOTE: make read-only in react/preact is almost imposible if we don't include some state management library, in svelte we'll need to add extra logic to handle writable stores (remove subcriptions), I have no idea what happens when returning only the solid accessor (the only we can use read-only is vue via readonly or computed from the ref).
NOTE: this PR should be included only in
v1.0.0
major version./cc @antfu I removed
ssr.noExternal
from main plugin,@vite-pwa/workbox-window
is ESM-first with dual ESM/CJS package exports.closes #620
supersedes #623