[Vuejs]-Nuxt custom router

0👍

Two issues:

  1. You currently have extendRoutes under a nested router property, which doesn’t exist. Move it to the top-level router prop:
router: {
  //router: {  // DON'T DO THIS
  //   extendRoutes() {...}
  //},

  extendRoutes() {...}
}
  1. The path property must start with a leading slash for non-nested routes:
routes.push({
  // path: 'here-i-am'  // DON'T DO THIS

  path: '/here-i-am'
})

Leave a comment