Firebase documentation says to use this code inside service worker:
import { initializeApp } from 'firebase/app'
import { getMessaging } from 'firebase/messaging/sw'
But I get this error:
Token error: FirebaseError: Messaging: We are unable to register the default service worker.
I assume that this is because WebPack under NuxtJS configuration ignores "import" inside service worker files.
Is there any way to fix this?