Created
December 9, 2020 19:04
-
-
Save MexsonFernandes/a9a670cec8e53a8384b7ddeb0a5c4bd4 to your computer and use it in GitHub Desktop.
Add a route in Nuxt Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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