Conversation
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
background_colorand amaskableicon entry.SKIP_WAITINGmessage shape from the service worker registration.Description
app/index.htmlformanifest,icon, and the app script by changing/...to./...and removed a placeholder comment.iconPathwithimport.meta.env.BASE_URLand replaced the hardcoded/icons/placeholder.svgwith that variable inapp/src/App.tsx.app/src/sw.tsto computeOFFLINE_URLrelative to the service worker scope, accept message objects with{ type: 'SKIP_WAITING' }, and useOFFLINE_URLinprecacheAndRouteand when falling back to the cached offline page.app/public/manifest.jsonandvite.config.tsby addingbackground_colorand amaskableicon entry, and changed iconsrcentries to relative paths (removed leading/).Testing
tsc --noEmitand it succeeded.npm run buildand the build completed successfully with the service worker precache including the offline page.npm testand all automated tests passed.Codex Task