Skip to content

Commit

Permalink
fix: lazy loading home and attempt to fix baseUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
hfidelis committed Feb 18, 2024
1 parent 565a775 commit aefac3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView
component: () => import('@/views/HomeView.vue')
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/AboutView.vue')
component: () => import('@/views/AboutView.vue')
}
]
})
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
base: '/'
base: './'
})

0 comments on commit aefac3a

Please sign in to comment.