My app’s main.js
looks like this:
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
const app = createApp(App)
const globalProps = app.config.globalProperties
app.use(router).mount('#app')
globalProps.msg = 'one, two, three'
And I’ve got a component App.vue
which looks like this:
<template>
<router-view/>
</template>
<script setup>
console.log(app.config)
</script>
<style>
@import 'assets/style.css';
</style>
When I run app.config
so I can access the globalProperties from within my component, it returns undefined
. What am I doing wrong?