Merging routes from multiple directories in the Vite build, results in duplicate routes in devtools/router.getRoutes()
, understanding normalization
#2363
Unanswered
josh-hemphill
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I did my best to match up all the route paths and names before passing them into the vue router, and they seem to be fine there, but once I load the router and try to pull the route records with
router.getRoutes()
a bunch of the subdirectories have duplicate base-level entries, which messes things up if I want to drive a Nav UI from the results of it.Not sure what I'm missing or if I'm misunderstanding the normalization steps the router takes internally, but it also effects what routes are listed in the devtools which can get pretty confusing.
Should I be trying to use
alias
es where multiple routes result in the same page instead of separate routes? Maybe that's effecting it?Beta Was this translation helpful? Give feedback.
All reactions