I am looking to create a global variable for my server's URL.
In my main.ts file, I added the following line:
Vue.prototype.$apiUrl = "http://localhost:3000";
Then, when trying to use it in my App.vue file:
console.log(this.$apiUrl)
The URL is displayed in the browser console, however, I encountered this error message:
Property '$apiUrl' does not exist on type 'App'. Vetur(2339)
This issue is causing some parts of the app to have an undefined $apiUrl value. How can I resolve this?