App.js
import * as Vue from 'vue';
import * as VueRouter from 'vue-router';
import {routes} from './routes';
const router = VueRouter.createRouter({
history: VueRouter.createWebHistory(),
routes,
});
Vue.createApp(App).use(router).mount('#App');
routes.js
import { createRouter, createWebHistory } from 'vue-router'
let login = require('./components/auth/login.vue').default;
let reg = require('./components/auth/register.vue').default;
let forget = require('./components/auth/forget.vue').default;
export const routes = [
{ path: '/', component: login , name: '/' },
{ path: '/re', component: reg , name: 'register' },
{ path: '/forget', component: forget , name: 'forget_password' },
]