Skip to content

feat: add prompt for update behavior - #5

Draft
userquin wants to merge 5 commits into
mainfrom
userquin/feat-add-prompt-for-update-behavior
Draft

feat: add prompt for update behavior#5
userquin wants to merge 5 commits into
mainfrom
userquin/feat-add-prompt-for-update-behavior

Conversation

@userquin

@userquin userquin commented Jan 15, 2024

Copy link
Copy Markdown
Collaborator

Right now I haven't found a way to provide the reload function to the app, just a few days using qwik, provided via window.loadNewVersion.

@Aslemammad no idea why the layout is broken adding the PWAPrompt component in the layout, there is a weird overflow hidden in the main/body.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jan 15, 2024

Copy link
Copy Markdown

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: b0468dc
Status: ✅  Deploy successful!
Preview URL: https://68a700b1.pwa-a3b.pages.dev
Branch Preview URL: https://userquin-feat-add-prompt-for.pwa-a3b.pages.dev

View logs

Comment thread src/prompt-for-update.ts Outdated
Comment thread src/prompt-for-update.ts Outdated
Comment thread src/sw.ts
const match = url.match(matcher);
// use null revision, removing the revision or using undefined will cause workbox warnings in runtime
return match ? { url, revision: null } : { url, revision: hash };
return buildMap.has(url)

@userquin userquin Jan 17, 2024

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should provide sw precaching manifest at build time, we don't need this logic at runtime (in client plugin we have all the required data to do it).

We also need to check why nr build + nr serve or nr build-prompt + nr serve are different from nr preview or nr preview-prompt (build command and/or serve is about SSG (??)?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant