Much needed example code for PWA mode using 'InjectManifest' and custom-service-worker.js #9054
-
It would be very helpful to provide sample code for @quasar/app 2.2.* and workbox 5.* and workbox-webpack-plugin 5.* . As I don't know what aspects are handled by quasar, so an example would be very helpful to all. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Below is service-worker.js file auto generated by quasar (pwa: {workboxPluginMode: 'GenerateSW'}). But I need to use 'InjectManifest' mode for push notification and custom caching logic. Please provide a sample 'custom-service-worker.js' to get started.
|
Beta Was this translation helpful? Give feedback.
-
This course will teach you how to setup a custom serviceworker with push notifications.( and a lot more PWA related features) |
Beta Was this translation helpful? Give feedback.
-
try this guide from @TobyMosque https://medium.com/@tobias.mesquita/quasar-framework-a-ssr-pwa-app-with-dynamic-data-196354bc0d5f, it's quite old but I learned to use InjectManifest |
Beta Was this translation helpful? Give feedback.
-
In case if anyone needs it in future, below is the basic setup code for 'custom-service-worker.js' file.
|
Beta Was this translation helpful? Give feedback.
In case if anyone needs it in future, below is the basic setup code for 'custom-service-worker.js' file.