ElemeFE / ElemeFE/element

[Bug Report] Vue 2 vue-router 3 环境下[VSCode 误报] export 'default' not found in 'vue-router' 类型检查错误 (vue-router@3.5.2)

Open
#23,068 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.13

### OS/Browsers version
Apple M3 Pro / Chrome 135.0.7049.115

### Vue version
2.6.2

### Reproduction Link
https://codepen.io/ziyoung/pen/LKNBqB

### Steps to reproduce
环境信息:
Vue: 2.6.10

Element UI: 2.15.13

vue-router: 3.5.2

VSCode: 1.99.3

import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('../views/home/Home')
const Category = () => import('../views/category/Category')
const Cart = () => import('../views/cart/Cart')
const Profile = () => import('../views/profile/Profile')

Vue.use(VueRouter)

const routes = [
{
Path: '',
redirect: '/home'
},
{
path: '/home',
component: Home
},
{
path: '/category',
component: Category
},
{
path: '/cart',
component: Cart
},
{
path: '/profile',
component: Profile
}
]

const router = new VueRouter({
routes,
mode: 'history'
})

export default router

### What is Expected?
how to solve then

### What is actually happening?
todo

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.