I'm keep getting in a new project the following console error:
[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
But I registered like every other component, but it's not working in a new project.
This is the app.js:
require('./bootstrap');
window.Vue = require('vue');
Vue.component('login-component', require('./components/LoginComponent.vue'));
const app = new Vue({
el: '#app',
});
It's the default Vue from Laravel.
The LoginCompontent looks like this:
<template>
<form class="default-form">
<h1>Login</h1>
</form>
</template>
<script>
export default {
mounted() {
console.log('Login Component mounted.');
},
}
</script>
But what am I doing wrong that it doesn't recognize it?