[Vuejs]-VueRouter is not working, how to solve this? VueRouter is not a constructor

7👍

import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router'

const routes=[
{ path:'/home', component: home },
{ path:'/zaposlenik', component: zaposlenik },
{path:'/department', component: department }
]

const router = VueRouter.createRouter({
   history: VueRouter.createWebHashHistory(),
   routes
})

createApp({}).use(router).mount('#app')

There you go!
From the documentation : Getting started

Leave a comment