When using the useToken hook, the following error occurs and I can't figure out how to fix it.
FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('https://localhost:5173/firebase-cloud-messaging-push-scope') with script ('https://localhost:5173/firebase-messaging-sw.js'): The script has an unsupported MIME type ('text/html'). (messaging/failed-service-worker-registration).
at registerDefaultSw (chunk-TJJQGBVO.js?v=57a89067:578:25)
at async updateSwReg (chunk-TJJQGBVO.js?v=57a89067:585:5)
at async getToken$1 (chunk-TJJQGBVO.js?v=57a89067:622:3)
When using the useToken hook, the following error occurs and I can't figure out how to fix it.
FirebaseContext