File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { createRouter , createWebHistory } from 'vue-router'
2
- import HomeView from '../views/HomeView.vue'
3
2
4
3
const router = createRouter ( {
5
4
history : createWebHistory ( import . meta. env . BASE_URL ) ,
6
5
routes : [
7
6
{
8
7
path : '/' ,
9
8
name : 'home' ,
10
- component : HomeView
9
+ component : ( ) => import ( '@/views/ HomeView.vue' )
11
10
} ,
12
11
{
13
12
path : '/about' ,
14
13
name : 'about' ,
15
14
// route level code-splitting
16
15
// this generates a separate chunk (About.[hash].js) for this route
17
16
// which is lazy-loaded when the route is visited.
18
- component : ( ) => import ( '.. /views/AboutView.vue' )
17
+ component : ( ) => import ( '@ /views/AboutView.vue' )
19
18
}
20
19
]
21
20
} )
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ export default defineConfig({
13
13
'@' : fileURLToPath ( new URL ( './src' , import . meta. url ) )
14
14
}
15
15
} ,
16
- base : '/'
16
+ base : '. /'
17
17
} )
You can’t perform that action at this time.
0 commit comments