firebase-module
firebase-module copied to clipboard
@nuxtjs/firebase + @nuxtjs/pwa/workbox conflict
Version
@nuxtjs/firebase: 5.0.7 @nuxtjs/pwa: 3.0.0-beta.20 firebase: 7.14.2 nuxt: 2.12.2
Reproduction Link
https://github.com/m2sd/nuxt-firebase-pwa-test
Steps to reproduce
Follow the steps in the repo
What is Expected?
Firebase ssr auth and Workbox should work in conjunction so that requests are augmented with authorization AND cached
What is actually happening?
Either Firebase ssr auth OR Workbox take precedence, the other one is skipped completely
Possible solutions
We could replace the page caching from workbox with our own implementation and configure according to the settings in options.pwa.workbox
.
Downside: This creates a direct dependency on workbox, but as the @nuxtjs/pwa
is the de facto standard for PWA implementations this could be a viable option.
Upside: The necessary change might be small enough that it could be implemented conditionally (if workbox is present => include as routingExtension
, else => include as standalone SW)
PS: sorry it took me so long to notice :disappointed: However, this issue affects this module even without my changes...
Hey @mentAl-maZe
Thanks for reporting. Can you hit me up on Discord so we can talk about this issue? You should be able to find me as "lupas" in the Nuxt Discord community.
I cannot properly reproduce your issue - for me offline caching seems to work fine and I never had issues with authentication not working either. But I am not a workbox expert so I believe you know more than me, would be great if you could guide me through.
I don't think we should be ending up implementing workbox functionality into this module though. So I hope we can find another solution for that.
I have created a workbox plugin to achieve interoperability.
Still we need a way to integrate it with @nuxtjs/pwa
somehow.
I think an integration with the PWA module is the way to go as people who want to use service worker sessions profit from using the module anyway.
I think the best solution would be to find a way to configure the PWA Workbox module so that it we can integrate this module seamlessly with it and provide an automatic configuration in future versions (of this module or the SSR extension)
@mentAl-maZe Any news on this? How should we proceed here?
@lupas Hi lupas sorry for the long silence, i've been crazy busy and it is hard to find the time for foss... :disappointed:
I'll try to get into it again over the next week, but as of now i can't make any promises... I'm sorry
@mentAl-maZe This is open-source, I'm not expecting you to do anything ;-) Everything you do is more than appreciated! :-) I'm super busy myself these days and can't get anything done here..
Thanks for the heads up!
Hey I'm running into this problem! Is there any way to patch it at least temporally? I'm really new to webdev
Hey, are there any updates on this? Thank you
@alanlobeslab Not yet... Had a look at it but couldn't find a simple solution and then run out of time.. not sure when this can be fixed. If someone has any ideas, please let me know :)
Thanks for replying @lupas. As a temporary fix, I used this which actually references your work. I replaced nuxt-fire with nuxt/firebase.
How's this issue coming along? The article referenced by @alanlobeslab didn't do it for me.