title: Set a variable messagingSenderId in service worker (Firebase)
body: <p>I would like to set a <strong>variable messagingSenderId value</strong> in my service worker, not an hardcoded one. Is it possible?</p>
  
  <p>I register my service worker like this:</p>
  
  <pre><code>navigator.serviceWorker.register( 'firebase-messaging-sw.js' )
  .then( function( registration ) {
      messaging.useServiceWorker( registration );     
  });
  </code></pre>
  
  <p>And in my firebase-messaging-sw.js, I initialize firebase like this</p>
  
  <pre><code>importScripts('https://www.gstatic.com/firebasejs/3.9.0/firebase-app.js' );
  importScripts('https://www.gstatic.com/firebasejs/3.9.0/firebase-messaging.js' );
  
  firebase.initializeApp({
    'messagingSenderId': 'my-id' // &lt;- I want this to be variable
  });
  </code></pre>
  
  <p>The problem is I can't find how to pass data to my service worker file. Any idea?</p>
  
  <p>Thanks</p>