-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Option to turn off PWA generation #3830
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
Comments
What targets are you referring to? Why would this option be helpful, what problem did you encounter that it would solve? Or what improvement does it bring? AFAIK, if a plattform / browser doesn't support Service Workers, it's simply skipped. |
I am currently developing the following app for multiple targets: https://collect-app.com/ Especially for iOS and macOS I distribute the built HTML/CSS/JS inside of the app package I put on the respective app stores. For Windows and web browsers instead PWA makes sense. See http://desktop.collect-app.com/ and https://mobile.collect-app.com/ as examples (work in progress). |
After looking closer at it, I have to agree, that by just not registering the |
when npm add @vue/cli-plugin-pwa into dependencies, but dont configure it in vue.config.js( or config like |
I need the same functionality for same reason. some of my build targets do not need a service worker(because they are in a local server anyway), I'm afraid it can cause buggy behaviour. I dont want to have it, i dont want to think about it. This is not just me : https://stackoverflow.com/questions/52800904/disable-pwa-plugin-in-vue-cli-3 |
I think this makes sense. I'll do make a PR. |
temporary workaround |
config.plugins.delete('pwa'); |
What problem does this feature solve?
If building for multiple targets, some of them might not support PWA. It would be great to have an option to turn off the functionality
What does the proposed API look like?
Currently the only way is to use a env var
VUE_CLI_BUILD_TARGET
different toapp
: https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-pwa/index.js#L4This line could e.g. be changed to:
The text was updated successfully, but these errors were encountered: