React-Penang / meetup-form

An attendance form for our meetup
2 stars 1 forks source link

Firebase throwing warning on console #3

Open jiantongc opened 4 years ago

jiantongc commented 4 years ago

As shown on the production site's console.

It looks like you're using the development build of the Firebase JS SDK.
When deploying Firebase apps to production, it is advisable to only import
the individual SDK components you intend to use.

For the module builds, these are available in the following manner
(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):

CommonJS Modules:
const firebase = require('firebase/app');
require('firebase/<PACKAGE>');

ES Modules:
import firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

Typescript:
import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';
chungweileong94 commented 4 years ago

In the latest firebase, we no longer import firebase like import firebase from 'firebase'. instead, we should import only the module that we want, example like: import firebase from 'firebase/app'

chungweileong94 commented 4 years ago

Solved in this PR https://github.com/React-Penang/meetup-form/pull/6