Skip to content

Instantly share code, notes, and snippets.

@Cerwyn
Created January 2, 2022 13:15
Show Gist options
  • Save Cerwyn/c1b9f181a1d49b693b4bd41b55fa38b2 to your computer and use it in GitHub Desktop.
Save Cerwyn/c1b9f181a1d49b693b4bd41b55fa38b2 to your computer and use it in GitHub Desktop.
Adonis-Vue3
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