Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: register service worker in dev #321

Merged
merged 8 commits into from
Jul 6, 2022
Merged

Conversation

userquin
Copy link
Member

@userquin userquin commented Jul 2, 2022

This PR also includes:

  • fix linting, excluded a few folders for dev and build
  • included prev/next links ready for next VitePress alpha release: https://vitepress.vuejs.org/guide/theme-prev-next-link.html
  • update deps with taze -r -w: beware, taze is resolving VitePress versions wrong, resolving to draft instead to alpha
  • split plugins

EDIT: there is no race condition, useImportRegister never updated on dev with dev options enabled:
https://github.com/antfu/vite-plugin-pwa/blob/main/src/index.ts#L133

supersedes #319 (sw in dev part)

@netlify
Copy link

netlify bot commented Jul 2, 2022

Deploy Preview for vite-plugin-pwa ready!

Name Link
🔨 Latest commit fa30b52
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-pwa/deploys/62c558f69960b5000ab17060
😎 Deploy Preview https://deploy-preview-321--vite-plugin-pwa.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@userquin userquin marked this pull request as ready for review July 2, 2022 10:23
@userquin userquin requested a review from antfu July 2, 2022 10:23
@antfu
Copy link
Member

antfu commented Jul 6, 2022

@userquin I have pushed a commit to refactor the context handling. Ideally, it should not affect the logic, but in case I made any mistake, please have a look and test a bit. If that looks good to you, we could then merge this.

@userquin
Copy link
Member Author

userquin commented Jul 6, 2022

@antfu I'll merge into main, you can release it or wait until I finish the new PR about adding support also for unregister the sw/pwa via selfDestroying option

@userquin userquin merged commit bf64bde into main Jul 6, 2022
@userquin userquin deleted the userquin/fix-register-sw-in-dev branch July 7, 2022 12:18
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.

2 participants