18 lines
565 B
TypeScript
18 lines
565 B
TypeScript
import { createRouter, createWebHistory } from 'vue-router'
|
|
import HomeView from '@views/HomeView.vue'
|
|
import AboutView from '@views/AboutView.vue'
|
|
import ArticleView from '@views/ArticleView.vue'
|
|
import NotFoundView from '@views/NotFoundView.vue'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{ path: '/', component: HomeView },
|
|
{ path: '/about/', component: AboutView },
|
|
{ path: '/articles/:pathMatch(.*)/', component: ArticleView },
|
|
{ path: '/:pathMatch(.*)', component: NotFoundView },
|
|
],
|
|
})
|
|
|
|
export default router
|