使用Firebase时,控制台中发生错误

时间:2018-09-01 06:19:35

标签: node.js vue.js

任何人都可以为我的错误提供解决方案。我曾经在这样的代码中导入firebase: 我尝试过更改此内容:

import firebase from 'firebase';

对此:

import firebase from 'firebase/app';
import 'firebase/auth';

我的控制台错误:

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>';

0 个答案:

没有答案