Мы пытаемся создать приложение SPA, используя Laravel + vue + bootstrap.
мы следовали этой статье: https://laravel -news.com / using-vue-router-laravel
но ни один компонент не загружается, и в консоли возникает ошибка:
SCRIPT438: SCRIPT438: Object doesn't support property or method 'component'
файл app.js:
require('./bootstrap');
window.Vue = require('vue');
window.Vue = require('vue-router');
Vue.component('example-component', require('./components/ExampleComponent.vue'));
Vue.component('application-component', require('./components/Application.vue'));
Vue.component('about-us-component', require('./components/About-US.vue'));
Vue.component('contact-us-component', require('./components/Contact-US.vue'));
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/',
name: 'application',
component: Application
},
{
path: '/about-us',
name: 'about-us',
component: About-Us
},
{
path: '/contact-us',
name: 'contact-us',
component: Contact-Us
},
],
});
const app = new Vue({
el: '#app',
components: { Application },
router,
});
где проблема икак мы можем это исправить?