Created
January 2, 2022 13:15
-
-
Save Cerwyn/c1b9f181a1d49b693b4bd41b55fa38b2 to your computer and use it in GitHub Desktop.
Adonis-Vue3
This file contains hidden or 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
import { createWebHistory, createRouter } from 'vue-router' | |
import Home from '@/views/Home.vue' | |
const routes = [ | |
{ | |
path: '/', | |
name: 'Home', | |
component: Home, | |
}, | |
{ | |
path: '/about', | |
name: 'About', | |
component: () => import('@/views/About.vue'), | |
}, | |
{ | |
path: '/:pathMatch(.*)', | |
name: 'NotFound', | |
component: () => import('@/views/NotFound.vue'), | |
}, | |
]; | |
const router = createRouter({ | |
history: createWebHistory(), | |
routes, | |
}); | |
export default router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment