Skip to content

Instantly share code, notes, and snippets.

@MexsonFernandes
Created December 9, 2020 19:04
Show Gist options
  • Save MexsonFernandes/a9a670cec8e53a8384b7ddeb0a5c4bd4 to your computer and use it in GitHub Desktop.
Save MexsonFernandes/a9a670cec8e53a8384b7ddeb0a5c4bd4 to your computer and use it in GitHub Desktop.
Add a route in Nuxt Module
...
this.extendRoutes((routes, resolve) => {
const routePaths = Object.assign({
admin: resolve(__dirname, './templates/pages/index.vue')
})
routes.push({
name: 'route_name',
path: '/' + 'route_name',
component: routePaths.admin
})
})
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment