警告“看来您正在使用Firebase JS SDK的开发版本"在Angular Firebase应用程序中 [英] Warning "It looks like you're using the development build of the Firebase JS SDK" in Angular firebase app

查看:66
本文介绍了警告“看来您正在使用Firebase JS SDK的开发版本"在Angular Firebase应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的角度项目中使用了角度火SDK.但是它会触发以下警告.我搜索了这个问题并获得了答案.但是这些答案不适用于有角度的项目.

I'm using angular fire sdk in my angular project. But it trigger following warning. I searched about this problem and get answers. But those answers cannot apply to angular project.

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

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆