mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
22 lines
511 B
JavaScript
22 lines
511 B
JavaScript
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
import Home from './src/components/Home.vue'
|
|
|
|
const routes = [
|
|
{ path: '/', name: 'Home', component: Home },
|
|
{
|
|
path: '/hello',
|
|
name: 'Hello',
|
|
component: () => import(/* a comment */ './src/components/Hello.vue')
|
|
},
|
|
{
|
|
path: '/about',
|
|
name: 'About',
|
|
component: () => import('./src/components/About.vue')
|
|
} // Lazy load route component
|
|
]
|
|
|
|
export default createRouter({
|
|
routes,
|
|
history: createWebHashHistory()
|
|
})
|