-
-
Notifications
You must be signed in to change notification settings - Fork 428
TypeError in server bundle with firebase/app #544
Comments
I encountered this error too. I don't think it is an issue for Sapper, it's more an issue with the way that firebase bundles, which is not ideal. I ended up using the CDN URLs, but I think this bug is better raised with firebase. |
Unfortunately I think it has something to do with the combination Rollup+Sapper :( |
any update on this? It's currently blocking development for me. I tried pulling in firebase as a cdn instead but no luck 😞 |
@antony could you share how you pulled in firebase via cdn? |
@monsieurBoutte sadly I lost the codebase. I basically just imported firebase from cdn using script tags - i.e. didn't bundle it. |
It looks like a fix will be released soon in the Firebase SDK. There's also a workaround by using the canary release. See firebase/firebase-js-sdk#1754 (comment) |
If you use Firebase and import
firebase/app
viaimport firebase from 'firebase/app'
an error is thrown during a build:
This is because Firebase uses
isomorphic-fetch
and thereforewhatwg-fetch
is also in the bundle(this line of code of
whatwg-fetch
is the reason whyself
is not defined in the server bundle......).
I am not sure whether this issue can be prevented within Sapper.
The text was updated successfully, but these errors were encountered: