Remove modalWelcome
[vchess.git] / client / src / router.js
CommitLineData
625022fd
BA
1import Vue from "vue";
2import Router from "vue-router";
3import Home from "./views/Home.vue";
4
5Vue.use(Router);
6
7function loadView(view) {
8 return () => import(/* webpackChunkName: "view-[request]" */ `@/views/${view}.vue`)
9}
10
11export default new Router({
12 routes: [
13 {
14 path: "/",
15 name: "home",
16 component: Home,
17 },
5b020e73
BA
18 {
19 path: "/variants",
20 name: "variants",
21 component: loadView("Variants"),
22 },
23// {
24// path: "/variants/:vname([a-zA-Z0-9]+)",
25// name: "rules",
26// component: Rules,
27// },
ccd4a2b7
BA
28// {
29// path: "/about",
30// name: "about",
31// // route level code-splitting
32// // this generates a separate chunk (about.[hash].js) for this route
33// // which is lazy-loaded when the route is visited.
34// component: loadView('About'),
35// //function() {
36// // return import(/* webpackChunkName: "about" */ "./views/About.vue");
37// //}
38// },
8d61fc4a 39 // TODO: gameRef, problemId: https://router.vuejs.org/guide/essentials/dynamic-matching.html
625022fd
BA
40 ]
41});