Skip to content

Commit 5aacda6

Browse files
committed
Use import() for all routes
1 parent 9389e97 commit 5aacda6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/plugins/router.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import { createRouter, createWebHistory } from "vue-router";
22
import type { RouteRecordRaw } from "vue-router";
33

4-
import HomeView from "@/views/main/HomeView.vue";
5-
import RunsView from "@/components/rdb/RunsView.vue";
6-
import RunView from "@/components/rdb/RunView.vue";
74

85
const routes: RouteRecordRaw[] = [
96
{
107
path: "/",
118
name: "home",
12-
component: HomeView,
9+
component: () => import("@/views/main/HomeView.vue"),
1310
},
1411
{
1512
path: "/about",
@@ -29,12 +26,12 @@ const routes: RouteRecordRaw[] = [
2926
{
3027
path: "/db/runs",
3128
name: "runs",
32-
component: RunsView,
29+
component: () => import("@/components/rdb/RunsView.vue"),
3330
},
3431
{
3532
path: "/db/runs/:runNo",
3633
name: "run",
37-
component: RunView,
34+
component: () => import("@/components/rdb/RunView.vue"),
3835
},
3936
{
4037
path: "/dev",

0 commit comments

Comments
 (0)