Currently, I am working on setting up a custom route in Nuxt using the following nuxt.config.js
:
router: {
base: '/',
router: {
extendRoutes (routes, resolve) {
routes.push({
name: 'custom',
path: 'here-i-am',
component: resolve(__dirname, 'pages/Slug.vue')
})
}
}
},
However, when trying to access localhost:3000/here-i-am, it is displaying an error message: This page cannot be found.
I have already created Slug.vue
in the /pages
directory.
Could there be something else missing? I even attempted to recompile but with no success.