N
Nuxt11mo ago
Thr0nSK

Dynamic route Vue Router warn

I am dynamically adding routes in a vue router plugin, however, as the routes do not exist before the user tries to access them, I keep getting these annoying Vue Router warnings in the console. They go away if I make the NuxtLinks external however, that will disable client side navigation entirely and force the page to refresh. What would be the recommended solution for this?
No description
4 Replies
Cue
Cue11mo ago
Try disabling prefetch on those links?
Thr0nSK
Thr0nSKOP10mo ago
doesn't seem to fix it 😕
Single
Single10mo ago
Can't you "create" those routes using a [...slug]? Can you give an example of routes you try to open that do not exist.
Thr0nSK
Thr0nSKOP10mo ago
I could create a catchall route [...slug].vue, but I don't really like the idea very much

Did you find this page helpful?