1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| import { createRouter, createWebHashHistory } from 'vue-router'; import FooComponent from 'path/to/foo-component'; import HomeComponent from 'path/to/home-component';
const routes = [ { path: '/', component: HomeComponent, meta: { title: import.meta.env.VITE_API_TITLE +'Home Page', // Title must be a string. }, }, { path: '/foo', component: FooComponent, meta: { title: 'Foo Page', }, }, ];
export default createRouter({ history: createWebHashHistory(), routes, });
|