Say I have a file in which I initialize Firebase and import its dependencies.
app.js
import firebase from 'firebase'
firebase.initializeApp()
Now I want to reference the same dependencies for firebase-messaging-sw.js as well but since it needs to be in the root, how can I tell Webpack to solve the dependencies?
Sure enough I could go with
importScripts('https://www.gstatic.com/firebasejs/4.1.3/firebase.js')
But that would download me the code twice.