I am getting this error when running npm run dev
registerFunctions(firebase$1, fetch.bind(self));
^
ReferenceError: fetch is not defined
I figured rxfire doesn't import fetch, so I add this line to src/server.ts
global['fetch'] = require('node-fetch');
And the error is still there, any suggestions? I would think I would not have to add this at all.
I am just using rxfire in a src/firebase.ts file like so:
import firebase from "firebase/app";
import "firebase/auth";
import "firebase/firestore";
import "firebase/functions";
import * as config from "./config.json";
firebase.initializeApp(config);
export const auth = firebase.auth();
export const googleProvider = new firebase.auth.GoogleAuthProvider();
export const db = firebase.firestore();
export const functions = firebase.functions();
Thanks,
J