-
Notifications
You must be signed in to change notification settings - Fork 929
CDN webpackJsonp function conflicts with existing webpackJsonp function #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight. |
@aputinski Nice find on this and thanks for the issue! I have this fixed in #43 As a workaround in the meantime, if you are already creating a webpack build of your own, I'd encourage you to use the firebase NPM package. e.g. var firebase = require("firebase/app");
require("firebase/auth");
require("firebase/database");
// Leave out Storage
//require("firebase/storage");
var config = {
// ...
};
firebase.initializeApp(config); |
Thanks for the quick fix! I'm actually using the npm package — I just happened to stumble upon this issue when I was just testing something out. |
Ahh gotcha. Well thank you for pointing it out 👍. Glad it is fixed for users to come. |
I'm facing same issue but with my own projects. Both projects are bundles with webpack 3.x. When I try to load JS files of one project into other. I notice that child project tries to load bundle from 'webpackJsonp' set by parent project. Could you please suggest how could I fix it? or if I could create custom name for function 'webpackJsonp' my child project. Thanks a lot ! |
[REQUIRED] Describe your environment
[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 defineswebpackJsonp
on the window and then later when I load Firebase from the CDN it tries to use mywebpackJsonp
function which won't work because they are different bundles.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
Relevant Code:
firebase-js-sdk/gulp/tasks/build.js
Line 139 in 4a96189
The text was updated successfully, but these errors were encountered: