Comments (6)
Agree with @leo-petrucci , more details on how to enable push notifications on the doc would really be helpful.
from docs.
Push notifications is out of scope from vite-plugin-pwa
, check this workbox entry about using strategies: https://developer.chrome.com/docs/workbox/the-ways-of-workbox#when_to_use_injectmanifest
The elk.zone repo has push notifications and web shared target api PWA capabilities, check also the PWA cookbook in the docs for some impl. details:
You also need to deal with permissions and push notification backend registration: https://github.com/elk-zone/elk/tree/main/composables/push-notifications.
Since Elk should deal with multiple backend, the logic has some complex logic (you cannot register multiple push notification from the same app, the browser will prevent multiple registrations, will be treated as spam: https://docs.elk.zone/pwa#push-notifications-subscription-logic).
You can also check mastodon sw impl. (and the logic there using react instead vue): https://github.com/mastodon/mastodon/tree/787279ad67cb9bd06b4628943f19ae8054a60b33/app/javascript/mastodon/service_worker
from docs.
Hey @userquin, thank you for the quick reply.
Push notifications is out of scope from vite-plugin-pwa
That's absolutely understandable, that's why it's not supported by default. However, they are important enough to be mentioned in the documentation.
Is there a specific reason as to why the docs on Push implementation shouldn't be expanded?
As I said I've looked at all the resources and browsed the Discord for a bit, there were quite a few people that were confused by how to do Push. You were there to help them, thankfully, but wouldn't it be better if that info was somewhere official and accessible to all without joining the Discord?
As good as Elk is I don't think linking to the repo and telling people to figure it out is great DX.
from docs.
Related Issues (20)
- automatic cutting
- Typo HOT 6
- Doc around caching strategy is confusing. HOT 4
- How to set ignoreVary for matching cache in ? HOT 2
- self.skipWaiting is not a function HOT 6
- `devTools.enabled` in strategy `generateSW` breaks due to wrong `globDirectory` HOT 1
- No workbox debug logs in with `devtools.enabled` and strategy `injectedManifest` HOT 1
- Where to put the manifest generated data? HOT 4
- [BUG]: custom envPrefix doesn't work when building
- Cleaning local storage on automatic reload
- Is it possible to change the index.html file name?
- Warnings on setting up a new workspace HOT 1
- Server keeps reloading in dev-mode on GET requests
- Create manifest.webmanifest in a sub directory of public HOT 3
- Documentation on sending native notifications?
- Any way to know if you're in a PWA? HOT 1
- Change background color of maskable icons HOT 4
- "@vite-pwa/nuxt": "^0.1.1" - manifest.webmanifest is 404 HOT 1
- Generate PWA icons using favicon.inbrowser.app HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.