#DRY approach to grouping routes
1 messages · Page 1 of 1 (latest)
I know about this method, but it is not a very clean solution. Nuxt should provide such feature out of the box. For example, putting folder name in brackets wouldn't add anything to the path.
putting a folder name in brackets turns it into a route parameter
I don't mean square brackets
So they should provide an opportunity to logically group related routes
they do, it's called folders 🙂
you can always opt out of using the folder based routing
What are you talking about, I don't understand
You create a folder and it becomes a part of the path
You didn't understand the question
yes, that is part of the logical organization of related routes
ok have a nice day
It isn't practical to have, for example, auth prefix for the login path. For this reason you don't want to have folders affecting paths all the time
You will come across such a problem if you work on medium or big projects with many routes
I am coming from custom routing. I have actually switched to file-system routing because they have awful support for custom routing rn. No way to assign middleware and most modules are built on file-system routing (e.g. i18n, sitemap, etc.).
yes i've worked with very large projects/apps with many routes, all of them have the auth prefix
Because of the constraints imposed by Nuxt
While in reality, it shouldn't be like that
For SEO, as well, it is preferable to provide shorter paths
i appreciate your opinion, it would be wise of you not to insult or talk down to people helping you
ciao
I'm not insulting you, mate. Just you haven't read my question properly
i assure you i have and i understand what you are looking for, that is why i have given you options that are clearly applicable.
so yes, you're talking to me like i don't understand things when i've obviously provided relevant answers that you simply don't like
I appreciate you effort. But the solutions you provided do not really address the problem. You are telling me what I already know, that it is a good practice to accept the folder based routing as it is, with folders reflecting on paths. But the solution I am looking for is actually QOL improvement for better readability.
With regard to Custom Routing, as I said, there are many problems with its support
But anyway, they seem to be adding route grouping in Nuxt 4