Skip to content

Conversation

kb-coder
Copy link

@kb-coder kb-coder commented May 26, 2021

What kind of change does this PR introduce? (check at least one)

  • [X ] Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • [X ] No

Other information:
The current vue-cli-plugin-pwa does not support debugging the service worker. For more advanced PWAs, we need to be able to locally debug the service worker in NODE_ENV='development' but serving up the PWA. (See #6457).

This PR is for a new version of the PWA plugin that uses Workbox instead of register-service-worker. I started with the existing pwa plugin and fixed a bug with the Start URL (which should be '/'). Then I removed register-service-worker and added Workbox 6.1.5. I also added the webpack setting to automatically add the PWA's name to the installed PWA's app bar.

Other features include:

  • Vue 3 composable to manage both Auto Updates and Manual Updates to the service worker.
  • Vue 3 component app-manual-update which developers can drop on any page or in the App.vue. It will prompt the user to update the service worker and not interrupt their work flow. This is a common PWA feature that was easy enough to provide something that developers can customize.
  • Vue 3 component app-auto-update which developers can drop on a landing page or login page if they want the service worker to be automatically updated. The most common use case would be for an application that requires login.
  • There are methods in register-service-worker to handle activation, and place holders for fetch, and other common service worker methods.

Please reach out if you have any questions.

yyzclyang and others added 10 commits January 25, 2021 21:05
Adding information about omitting publicpath config if you deploy to a custom domain.
* Minor change on the staging mode example As a beginner, I was confused with the parentheses staging line of the example. I thought the parentheses were the pattern to make the env variable work. I hope the change that I made could help.
* docs: (ru) config/readme.md update * docs: (ru) eslint.md update * docs: (ru) cli-service.md update * docs: (ru) css.md update * docs: (ru) mode-and-env.md update * docs: (ru) deployment.md update Co-authored-by: Alex Sokolov <4497128+Alex-Sokolov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants