title: Firebase FCM React project issue - firebase-messaging-sw.js wrong type?
body: <p>Im tryin to get Firebase FCM working in my React project(using webpack )</p>
  
  <p>When trying to getToken() using:</p>
  
  <pre><code> messaging.requestPermission()
    .then(function() {
      console.log('Notification permission granted.');
      return messaging.getToken();
    })
    .then(function(token) {
      console.log('token')
    })
    .catch(function(err) {
      console.log('Unable to get permission to notify.', err);
    });
  </code></pre>
  
  <p>the exception is thrown as follows:</p>
  
  <pre><code>browserErrorMessage: "Failed to register a ServiceWorker: The scrip 
  has an unsupported MIME type ('text/html')
  </code></pre>
  
  <p>I understand that this issue is related to the missing service worker file: firebase-messaging-sw.js, which I added to the root of the project but I'm still getting the same error.</p>
  
  <p>Im not sure what im doing wrong here, i've set up vanilla java script project and it works fine ....</p>
  
  <p>Any ideas about this issue ?</p>