How would I access variables declared within the setup script within the none setup script? I attempt to update the message in the example below when something happens within the script tags. However, msg just returns undefined, I've looked through the Vue documentation on setup scrips, but there doesn't seem to be any mention of accessing the variable in none setup scripts.
<script setup>
var msg = 'Hello!';
</script>
<script>
export default {
data() {
return {
};
},
mounted(){
// my current attempt to get msg and update it. However, I just get undefined.
this.msg = 'Something happened inside script tags';
//or msg = 'Something happened inside script tags';
},
</script>
<template>
<p>{{ msg }}</p>
</template>