i'am trying to attach a vue component with a tag
MyComponent.vue
<template>
<div>
<h1>Hi</h1>
</div>
</template>
<script>
export default {
}
</script>
this is app.js
require('./bootstrap');
window.Vue = require('vue');
import MyComponent from './components/MyComponent.vue';
Vue.component('myComponent', MyComponent);
const app = new Vue({
el: '#app'
})
And this is the body of my welcome.blade
<body>
<div id="app">
<myComponent></myComponent>
</div>
<script src="{{ mix('js/app.js') }}"></script>
</body>
and i get this error
Unknown custom element: mycomponent - did you register the component correctly? For recursive components, make sure to provide the "name" option.