Service Worker registration error: Unsupported MIME type ('text/html')

前端 未结 12 1254
梦如初夏
梦如初夏 2020-12-05 17:44

I\'m using create-react-app with an express server.

create-react-app has a pre-configured ServiceWorker that caches local assets (https://github.com/fac

12条回答
  •  醉梦人生
    2020-12-05 18:24

    I was facing the same issue and removing other firebase libraries from my config solve the issue for me Check this on Github

    
    // Change this 
    var firebaseConfig = {
        apiKey: "*********",
        authDomain: "**********",
        databaseURL: "*********",
        projectId: "***********",
        storageBucket: "************",
        messagingSenderId: "***********",
        appId: "************"
    };
    
    // To =>
    var firebaseConfig = {
      apiKey: "*****************",
      projectId: "**********",
      messagingSenderId: "*******",
      appId: "***********"
    };
    
    

提交回复
热议问题