Open laurentpayot opened 6 years ago
It's working fine for my app. Added runtimeCaching
section for external sources caching syntax examples.
Hi, Thanks for this. Since v0.15 is so close and it has a new architecture for the starter kit, it would be best to bring this in on the new architecture. But unfortunately there's no time left to get this into v0.15 and test it thoroughly. Will add it to next version (v1.0).
I understand. No problem.
I think it's more to it, since we need to adjust the service-worker (dev and prod) files too. They need to use the Workbox provided API.
When Workbox 3.0 will be official, won't it be easier to migrate actual "sw-precache-webpack-plugin" used by Quasar Framework PWA to the "Workbox webpack plugin" ?
If I want to do a PWA with Quasar now, what should I do then ? Wait for a release with Workbox or deal with sw-precache for a while and the new update Quasar-cli will be able to migrate it on his own ?
A third option would be to wait for Quasar-CLI to use Vue CLI 3 (with workbox plugin) but only @rstoenescu knows if that will happen some day…
My option seems easier to implement and btw if we want the feature quick, but the best (for me) is the option you mentioned, as far as we need to be updated with the last official Vue CLI, even if it makes ages (@rstoenescu said "Will add it to next version (v1.0)", but we've still no news since about 2 months and I'm not really aware about when this 1.0 version will be released).
@kevinmarrec When I made this PR 4 months ago GenerateSW
didn't exist, but "your" option is the same as mine: updating the PWA template with the webpack workbox plugin. All the remarks made by @rstoenescu remain valid.
@laurentpayot Okay ! I didn't look deep at what was existing 4 months ago and what exists now, but all we can do for now is wait, I guess !
@kevinmarrec I think that with Quasar 0.15+ you can use the extendWebpack function of quasar.conf.js to remove the old sw-precache plugins from the webpack config object and replace it with the workbox plugin. I will try.
@laurentpayot Ok cool ! Please forward your changes/code if you succeed to make it working :)
@kevinmarrec I had a look and with Quasar 0.15+ new starter kit PWA mode is much more than a webpack plugin added to the config. So yes for now all we have to do is to wait...
@laurentpayot Ok, thanks for your feedback !
Have you any advices to get started with Service Workers using Quasar PWA, considering all we talked about ? I mean should I use pw-precache for now and then migrate myself to Workbox then ?
I do not know how long will it take to get Workbox there, so... All I know : It's on the roadmap (I got a reply on Yesterday Quasar Release Tweet's).
@kevinmarrec good to know it's on the roadmap! I just created this feature request: https://github.com/quasarframework/quasar-starter-kit/issues/36
sw-precache is working fine, you can go right now with Quasar pwa mode.
@laurentpayot Ok !
Have you any websites which may references sw-precache API better than the Official GitHub's one ? I'll give it a try
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
It's submitted to the(NO DEV BRANCH)dev
branch and not themaster
branchfix: #xxx[,#xxx]
, where "xxx" is the issue number)It's been tested on a Cordova (iOS, Android) appIt's been tested on a Electron appIf adding a new feature, the PR's description includes:
Other information: Feature Request #14