added base path to the vue router
This commit is contained in:
@@ -8,10 +8,10 @@ import Detail from '@/pages/Detail.vue'
|
||||
const app = createApp(App)
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{ path: '/', component: Home},
|
||||
{ path: '/:name', component: Detail, props: true}
|
||||
{ path: '/', component: Home },
|
||||
{ path: '/:name', component: Detail, props: true }
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user