0๐
I also faced this issue. However I managed to resolve this, thus Iโm sharing my answer.
Using Vue3 than make the necessary changes in your app.js:
import {
createApp
} from 'vue';
const app = createApp({});
// You can register your components globally like this also
// Add as many components as you want.
app.component('Name of your component', require('Path to the component').default)
// In your case
app.component('my-button',require('Path to the component').default);
app.mount('#app');
I think it should solve the issue.
Please check.
-1๐
i stumbled
const app = createApp ({})
should come before
components.forEach (component => {
app.component (component.name, component)
})
Source:stackexchange.com