-
Notifications
You must be signed in to change notification settings - Fork 962
Closed
Labels
Description
[REQUIRED] Describe your environment
- Operating System version: macOS 10.12
- Firebase SDK version: 4.1.1 (CDN)
- Firebase Product: all
[REQUIRED] Describe the problem
Steps to reproduce:
It appears that the client is bundled via webpack and uses the CommonsChunkPlugin
. My code is also bundled via webpack uses the same plugin. As a result my code defines webpackJsonp
on the window and then later when I load Firebase from the CDN it tries to use my webpackJsonp
function which won't work because they are different bundles.
<!-- My Wepback bundles -->
<script src="/assets/bundle/common.js"></script>
<script src="/assets/bundle/app.js"></script>
<!-- Firebase -->
<!-- (throws an error) -->
<script src="https://www.gstatic.com/firebasejs/4.1.1/firebase.js"></script>
Firebase should change the name of the jsonp function used to something like webpackJsonpFirebase
to avoid conflicts.
https://webpack.js.org/configuration/output/#output-jsonpfunction
This needs to be changed if multiple webpack runtimes (from different compilation) are used on the same webpage.
Relevant Code:
firebase-js-sdk/gulp/tasks/build.js
Line 139 in 4a96189
output: { |