I'm using next-pwa to create a progressive web app. Till today I didn't find out how to bundle an external library (https://github.com/jakearchibald/idb) to use the library in a service worker. Instead I had to duplicate my code from the /src to the scope of the service worker which is the /public folder in my case.
Hi
I'm using next-pwa to create a progressive web app. Till today I didn't find out how to bundle an external library (https://github.com/jakearchibald/idb) to use the library in a service worker. Instead I had to duplicate my code from the /src to the scope of the service worker which is the /public folder in my case.
Now with Nextjs13 there seems to be an easier way to bundle external packages. Does anyone have an example how to bundle an external library like "idb" and import it in a service worker and in the "/src" folder?
Thanks in advance Nino