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 {
4
4
createWebHistory ,
5
5
} from 'vue-router'
6
6
import isElectron from 'is-electron'
7
- import Landing from '@/pages/Landing.vue'
8
7
import Editor from '@/pages/Editor.vue'
9
- import ErrorPage from '@/pages/404. vue'
8
+ import { defineAsyncComponent } from 'vue'
10
9
11
10
const electronRoutes = [
12
11
{ path : '/' , component : Editor } ,
13
12
{ path : '/:pathMatch(.*)*' , redirect : '/' } ,
14
13
]
15
14
16
15
const 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
+ } ,
20
28
]
21
29
22
30
export default createRouter ( {
You can’t perform that action at this time.
0 commit comments