From 5cf541279abf94e4564efd215234ec1a15bfd821 Mon Sep 17 00:00:00 2001 From: Thomas Dekiere Date: Tue, 12 Oct 2021 12:30:50 +0200 Subject: [PATCH] fix: exclude firebase source from bundle --- rollup.config.js | 3 +-- src/document/__tests__/watch.test.ts | 2 +- src/document/document.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 2b21b82..966fb34 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,9 +7,8 @@ const input = `src/index.ts`; const external = [ "mobx", - "firebase/app", + "firebase/auth", "firebase/firestore", - "@firebase/rules-unit-testing", ]; export default [{ // Commonjs diff --git a/src/document/__tests__/watch.test.ts b/src/document/__tests__/watch.test.ts index c611a4e..4f3d41b 100644 --- a/src/document/__tests__/watch.test.ts +++ b/src/document/__tests__/watch.test.ts @@ -4,7 +4,7 @@ import { waitFor } from "@testing-library/dom"; import { Doc } from "../.."; import { IBook, IBookData } from "../../__test-utils__"; -import { collection, deleteDoc } from "@firebase/firestore"; +import { collection, deleteDoc } from "firebase/firestore"; import { CollectionReference, doc, setDoc } from "firebase/firestore"; function deserializeBook(book: IBookData): IBook { diff --git a/src/document/document.ts b/src/document/document.ts index 541e104..5aa647c 100644 --- a/src/document/document.ts +++ b/src/document/document.ts @@ -1,4 +1,4 @@ -import { doc, onSnapshot } from "@firebase/firestore"; +import { doc, onSnapshot } from "firebase/firestore"; import { observable, computed, action, IObservableValue, makeObservable } from "mobx"; import { CollectionReference, DocumentReference } from "firebase/firestore"; export interface IDocOptions {