I tried to follow the docs and add a custom route, but looks like it's in conflict with the nuxt-created route. What would be the correct way to get a route with an optional parametre?
router: {
extendRoutes(routes) {
routes.push({
name: 'post',
path: '/posts/:id',
alias: '/posts/:id/:slug?',
component: '~pages/posts/_id.vue'
})
}
}
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c178">#c178</a>)</em></sub></div>