Skip to content

Type Error for $route After Using volar/sfc-typed-router #747

@l246804

Description

@l246804
Image

As shown in the screenshot above, a basic project was created directly via pnpm create vue. After adding unplugin-vue-router according to the documentation, an issue arose when using the volar/sfc-typed-router plugin: $route is considered as type number, and useRoute() also cannot be correctly resolved to the current file's route.

tsconfig.app.json:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    ♦️ need reprothe issue needs a reproduction for further investigation👍 contribution welcomeothers are welcome to implement/fix this🙏 help wantedhelp in this issue is welcome

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions