1.Uncaught SyntaxError: The requested module '/node_modules/.vite/vue-router.js?v=4b09f9b8' does not provide an export named 'default'
【解决】
vue-router的配置文件:
方案一: import * as VueRouter from 'vue-router' import routes from './routers' const router = VueRouter.createRouter({ history: VueRouter.createWebHashHistory(), routes }) 方案二: import {createRouter, createWebHashHistory} from 'vue-router' import routes from './routers' const router = createRouter({ history: createWebHashHistory(), routes })
参考:https://blog.csdn.net/Dorothy1224/article/details/120011513
标签:vue,错误,Vue3,常见,createRouter,VueRouter,import,routes,router From: https://www.cnblogs.com/friend/p/17172899.html