Last active
September 21, 2020 09:26
-
-
Save BartoszBilejczyk/e95edf001b5d83755f27f51216dfef95 to your computer and use it in GitHub Desktop.
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
import { createRouter, createWebHistory } from "vue-router"; | |
const routes = [ | |
{ | |
path: '/dashboard', | |
name: 'Dashboard', | |
component: () => | |
import(/* webpackChunkName: 'dashboard' */ '../views/Dashboard.vue') | |
}, | |
{ | |
path: '/:pathMatch(.*)*', | |
redirect: () => '/dashboard' | |
} | |
]; | |
const router = createRouter({ | |
history: createWebHistory(process.env.BASE_URL), | |
routes | |
}); | |
export default router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment