electron-userland / electron-userland/electron-webpack

Error after loading Firestore module

Open
#78 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
902
Forks
168
PR merge metrics
No merged PRs in 30d

Description

I'm having an issue with loading specific modules. It can be reproduced like this:

Install Google Firebase SDK:

```bash
npm install firebase
```

Load the modules. Please note the `firestore` add-on for Firebase, which is not captured in a variable (on purpose). It should add a `firestore()` function to the `firebase` module.

```js
import firebase from 'firebase';
import 'firebase/firestore';
```

Initialize Firestore:

```js
firebase.firestore();
```

It now throws an error:

```
Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_6_firebase___default.a.firestore is not a function
```

This all worked fine with my own Webpack config, but it broke when I switched to `electron-webpack`. It seems to be doing something weird in the module loader?

Docs: https://firebase.google.com/docs/firestore/quickstart

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.