Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find @vue-router module #15

Closed
hi-reeve opened this issue Jul 5, 2022 · 4 comments
Closed

cannot find @vue-router module #15

hi-reeve opened this issue Jul 5, 2022 · 4 comments

Comments

@hi-reeve
Copy link
Contributor

hi-reeve commented Jul 5, 2022

trying to migrate this morning, but got stuck because of this

image

also is it possible to get the generated routes?
with vite-plugin-vue-layouts
we need the generated routes to bootstrap the vite plugin layouts itself.

@hi-reeve
Copy link
Contributor Author

hi-reeve commented Jul 5, 2022

oh my bad, seems like i'm missing the requirement to upgrade to vue-router 4.1

edit: updated to vue-router 4.1 but still cannot find @vue-router package

@posva
Copy link
Owner

posva commented Jul 5, 2022

You seem to have missed the configuration part at https://github.com/posva/unplugin-vue-router#typescript

About the layouts plugin, it should be possible to make it work with the extendRoutes() option: extendRoutes: routes => setupLayouts(routes)

@hi-reeve
Copy link
Contributor Author

hi-reeve commented Jul 5, 2022

You seem to have missed the configuration part at https://github.com/posva/unplugin-vue-router#typescript

About the layouts plugin, it should be possible to make it work with the extendRoutes() option: extendRoutes: routes => setupLayouts(routes)

oh right i missed that section.
also is there any way to typing the route meta type? for all route.

@posva
Copy link
Owner

posva commented Jul 5, 2022

Yes, with RouteMeta, like shown in vue router docs

@posva posva closed this as completed in 8322d6c Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants