11 months ago

Workbox and Laravel Mix - Super Confusing!

Posted 11 months ago by thebigk

I'm trying to build a PWA for my app; and have spent almost 48 hours trying to figure out how to make use of Workbox with Laravel Mix. What's ironical is that Google says Workbox is meant to make things easy!


Okay, so far I've figured out that -

  1. I will need to use the InjectManifest Plugin because I want to integrate Push notifications service in my Service Worker

  2. I have no clue how to specifiy the paths for swSrc and swDest.

  3. What code should go into my webpack.mix.js and whether I should have a temporary service-worker inside my resources/js folder to create a new service worker inside public/ folder.

Can someone help?

PS: I've read almost every blog and help article; but none talks about reliably using Workbox with Laravel mix. Would really appreciate some help here.

Please sign in or create an account to participate in this conversation.