import { createWebHistory, createRouter } from 'vue-router'; // ------------ const EnvError = import('./components/EnvError.vue'); const Home = import('./components/Home.vue'); const Imprint = import('./components/Imprint.vue'); const Privacy = import('./components/Privacy.vue'); const Register = () => import('./components/Register.vue'); const Profile = () => import('./components/Profile.vue'); // let routes = [ { path: '/:pathMatch(.*)*', component: EnvError } ]; if (typeof config !== 'undefined') { if (config.baseurl && config.documentserver_key) { routes = [ { path: '/', component: Home }, { path: '/imprint', component: Imprint }, { path: '/privacy', component: Privacy }, { path: '/register', component: Register }, { path: '/register/:token', component: Register, props: true }, { path: '/profile/:token', component: Profile, props: true } ]; } } export const router = createRouter({ history: createWebHistory(), routes });