title: Firebase: change the location of the service worker
body: <p>I am trying to use Firebase messaging (web). Firebase by default searches for the file "firebase-messaging-sw.js" which holds the service worker. </p>
  
  <p>The service worker script is expected to be on the absolute path of the application! For example : <a href="http://localhost/firebase-messaging-sw.js" rel="noreferrer">http://localhost/firebase-messaging-sw.js</a> </p>
  
  <p>How to change this default location?! Searching the official docs I found this method: <code>useServiceWorker</code> which accepts a service worker registeration, but trying to use it I get an error that the method doesn't even exist!</p>
  
  <p>So, How to change the location of the service worker for firebase messaging? </p>