0👍
I changed createWebHistory to createWebHashHistory and it worked.
import { createWebHashHistory, createRouter } from "vue-router";
const router = createRouter({
history: createWebHashHistory(),
routes,
});
Source:stackexchange.com