I'm doing everything by the docs, but, still having an error in the console. What I'm trying is to create a global variable of a Firebase instance.
main.js
:
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import firebase from 'firebase'
require('firebase/firestore')
const config = {
// config
}
firebase.initializeApp(config)
const app = createApp(App)
.use(store)
.use(router)
.mount("#app");
console.log(app.config) // undefined
app.config.globalProperties.$firebase = firebase;
Why is it undefined
? Or should I overwrite property globalProperties
myself in the config
object?