-
-
Couldn't load subscription status.
- Fork 6.3k
Description
Version
4.0.5
Reproduction link
https://www.npmjs.com/package/@vue/cli-plugin-pwa
localhost:8080/service-worker.js is returning some weird code I didn't write.
Reading the docs, the plugin is doing this to prevent "caching problems".
Service Workers can do more than "caching", and running Service Workers in development is necessary to develop application features that depend on them.
Steps to reproduce
Read the docs here:
https://www.npmjs.com/package/@vue/cli-plugin-pwa
The docs indicate I should compile for production, then do development. This doesn't make sense.
Also, the plugin serves non-functional code that I didn't write into my application. There doesn't seem to be a way to override this feature, and run my code in development.
Here is the plugin code:
https://github.com/MichaelJCole/vue-cli/blob/dev/packages/%40vue/cli-plugin-pwa/index.js
How can I run my service worker in development?
What is expected?
To run my code.
What is actually happening?
Some weird code I didn't write is running.