[Vuejs]-SCRIPT438: SCRIPT438: Object doesn't support property or method 'component'

0๐Ÿ‘

โœ…

I hope this work with you

var bootstrap = require('./bootstrap');

var Vue = require('vue');
var VueRouter = require('vue-router');
Vue.use(bootstrap);

var ExampleComponent = require('./components/ExampleComponent.vue');
var ApplicationComponent = require('./components/Application.vue');
var AboutUsComponent = require('./components/About-US.vue');
var ContactUsComponent = require('./components/Contact-US.vue');

const router = new VueRouter({
    mode: 'history',
    routes: [
        {
            path: '/',
            name: 'application',
            component: ApplicationComponent
        },
        {
            path: '/about-us',
            name: 'about-us',
            component: AboutUsComponent
        },
        {
            path: '/contact-us',
            name: 'contact-us',
            component: ContactUsComponent
        },
    ],
});

const app = new Vue({
    el: '#app',
    components: { Application },
    router,
});

Leave a comment