[Vuejs]-Uncaught Error: [vue-router] "path" is required in a route configuration when exporting imports

0👍

you should do it like this

notes/routes/routes.js

import Index from './index'
import Search from './search'
import Features from './features'

export default [
    Index,
    Search,
    Features
]

routes.js

import Vue from 'vue'
import Router from 'vue-router'
import routes from '@notes/routes/routes'

Vue.use(Router)



const router = new Router({
    mode: 'history',
    routes
});

the way you did it. you actually get array with one item which contains all the routes object

Leave a comment