I started a Vue3 project with Vue CLI. The app initialization code was:
createApp(App)
.use(AudioVisual)
.component("font-awesome-icon", FontAwesomeIcon)
.mount('#app')
Now I want to use mitt to use event emitter, and thus I need to use app.config.globalProperties. So, I used the following syntax-
const app = createApp(App);
app.use(AudioVisual);
app.component("font-awesome-icon", FontAwesomeIcon);
app.config.globalProperties.emitter = emitter;
app.mount('#app');
Is there any way, I can use the first syntax and use mitt in my application? I tried
createApp(App)
.config.globalProperties.emitter = emitter;
...
But that did not work.