Can I rename firebase-messaging-sw.js to firebase-messaging-sw.xxx.js?

  angular, firebase-cloud-messaging

I have 3 files for fcm service worker

  1. firebase-messagaging-sw.dev.js
  2. firebase-messagaging-sw.staging.js
  3. firebase-messagaging-sw.prod.js
    and put it as assets in angular.json.

Unfortunately,
I got an error in development environment: The script has an unsupported MIME type (‘text/html’). (messaging/failed-service-worker-registration).

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.