我正在用Nuxt.js和编写一个Web应用程序Firebase.我需要在哪个文件中初始化Firebase?换句话说,在哪里放这个代码片段?
var config = {
apiKey: "xxxxxxxxxx",
authDomain: "xxxxxxxxx.firebaseapp.com",
databaseURL: "https://xxxxxxxx.firebaseio.com",
projectId: "xxxxxxxxx",
storageBucket: "xxxxxxxxxxx.appspot.com",
messagingSenderId: "xxxxxxxxxx"
};
firebase.initializeApp(config);
Run Code Online (Sandbox Code Playgroud)