fix(pwa): emit legacy service-worker2.js and unregister old registrations#44
Open
fix(pwa): emit legacy service-worker2.js and unregister old registrations#44
Conversation
Owner
Author
|
@codex fix merge conflict |
|
To use Codex here, create a Codex account and connect to github. |
Owner
Author
|
@codex resolve conflict |
|
To use Codex here, create a Codex account and connect to github. |
Owner
Author
|
@codex fix merge conflict
…On Wed, Dec 31, 2025, 9:39 PM chatgpt-codex-connector[bot] < ***@***.***> wrote:
*chatgpt-codex-connector[bot]* left a comment (hsingh23/bhajans2#44)
<#44 (comment)>
To use Codex here, create a Codex account and connect to github
<https://chatgpt.com/codex/settings/connectors>.
—
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIVPARQRDRKHEA625ESBJD4EPYKNAVCNFSM6AAAAACQM2IYAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMBSGQ2DQNBVHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Summary
Testing
Notes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
VitePWAto emit the legacy filename by settingfilename: "service-worker2.js"invite.config.js.unregisterLegacyServiceWorkersinsrc/index.jsxto find and unregister registrations whosescriptURLdoes not end withservice-worker2.js.registerServiceWorkerwhich calls the cleanup and then captures theupdateSWhelper fromregisterSW, and call it frombootstrapbefore app render.window.requestServiceWorkerUpdateand trigger it onvisibilitychange(when visible) andonlineevents, with informative console logs in lifecycle callbacks.Testing
bun run validate(which runstsc --noEmit && bun run lint && bun run test) and it failed due to missing dependencies and type declarations in the environment.Codex Task