Skip to content

Commit e512c6e

Browse files
author
Mat Brown
committed
Use a la carte Firebase packages
Instead of pulling in the master Firebase package as a dependency, use a la carte Firebase packages for the Firebase components that we actually use—namely `@firebase/app` (the core), `@firebase/auth`, and `@firebase/database`. Also add `@firebase/app-types` as a dependency to satisfy the peer dependency of the aforementioned packages. Just requires changing the imports in the `appFirebase` service to target the individual packages, and everything seems to work just fine.
1 parent 5893886 commit e512c6e

3 files changed

Lines changed: 29 additions & 280 deletions

File tree

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@
146146
"bugs": "https://trello.com/b/ONaFg6wh/popcode",
147147
"license": "MIT",
148148
"dependencies": {
149+
"@firebase/app": "^0.1.10",
150+
"@firebase/app-types": "^0.1.0",
151+
"@firebase/auth": "^0.3.4",
152+
"@firebase/database": "^0.1.11",
149153
"PrettyCSS": "^0.3.17",
150154
"array-to-sentence": "^2.0.0",
151155
"bowser": "^1.4.5",
@@ -157,7 +161,6 @@
157161
"enumify": "^1.0.4",
158162
"es6-set": "^0.1.4",
159163
"esprima": "^3.0.0",
160-
"firebase": "^4.1.3",
161164
"github-api": "^3.0.0",
162165
"hast-util-sanitize": "^1.1.1",
163166
"highlight.js": "^9.12.0",

src/services/appFirebase.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import firebase from 'firebase/app';
2-
import 'firebase/auth';
3-
import 'firebase/database';
1+
import {firebase} from '@firebase/app';
2+
import '@firebase/auth';
3+
import '@firebase/database';
44
import config from '../config';
55

66
const appFirebase = firebase.initializeApp({

0 commit comments

Comments
 (0)