File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,27 @@ import {
44 createWebHistory ,
55} from 'vue-router'
66import isElectron from 'is-electron'
7- import Landing from '@/pages/Landing.vue'
87import Editor from '@/pages/Editor.vue'
9- import ErrorPage from '@/pages/404. vue'
8+ import { defineAsyncComponent } from 'vue'
109
1110const electronRoutes = [
1211 { path : '/' , component : Editor } ,
1312 { path : '/:pathMatch(.*)*' , redirect : '/' } ,
1413]
1514
1615const webRoutes = [
17- { path : '/' , component : Editor } ,
18- { path : '/landing' , component : Landing } ,
19- { path : '/:pathMatch(.*)*' , component : ErrorPage } ,
16+ {
17+ path : '/' ,
18+ component : defineAsyncComponent ( ( ) => import ( '@/pages/Editor.vue' ) ) ,
19+ } ,
20+ {
21+ path : '/landing' ,
22+ component : defineAsyncComponent ( ( ) => import ( '@/pages/Landing.vue' ) ) ,
23+ } ,
24+ {
25+ path : '/:pathMatch(.*)*' ,
26+ component : defineAsyncComponent ( ( ) => import ( '@/pages/404.vue' ) ) ,
27+ } ,
2028]
2129
2230export default createRouter ( {
You can’t perform that action at this time.
0 commit comments