In my main.js file I set vue up like so:
window.Vue = require('vue');
Vue.component('my-component', require('./components/MyComponent.vue'));
const app = new Vue({
el: '#app',
});
Also in my main.js file I have a function:
function test() {
//do something
}
How can I call the test method from inside a vue component? I know this is not an ideal set up but I'm working with legacy stuff.