我正在构建一个 Angular Web 应用程序,我正在像这样导入:
import * as firebase from 'firebase';
db = firebase.firestore();
但最近我不断收到这个错误:
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):
Typescript:
import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';
因此,很自然地,我将其更改为:
import * as firebase from 'firebase/app';
import 'firebase/firestore';
db = firebase.firestore();
但错误并没有消失。不明白怎么去掉?