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
feat(utils): export sort routes #6277
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #6277 +/- ##
=====================================
Coverage 95.7% 95.7%
=====================================
Files 79 79
Lines 2652 2652
Branches 683 683
=====================================
Hits 2538 2538
Misses 98 98
Partials 16 16
Continue to review full report at Codecov.
|
Would it make sense to provide it as an argument for |
Yes, so people dont have to import from nuxt utils themselves |
Nice PR @pimlie Would it be even better if we call |
It would be better probably, but are we 100% sure that As vue-router seems to be already adding functionality for this, I think its best if we just provide a temporary fix until auto path ranking is merged in vue-router. |
Did not think of this, you are right @pimlie Ready to merge 👍 |
Is there any documentation of how to use this anywhere? |
(Helps to) resolve:
extendRoutes
option #6275Types of changes
Description
Well, not really a feature but also not a bug fix.
If a user calls
extendRoutes
and adds new routes, he/she is also responsible for maintaining proper order of the routes. This is quite a cumbersome task, by exposing the sortRoutes method a user can import it, add route to his/her liking and then easily sort them properly again.(This is useful until vue-router fully supports auto path ranking)
Checklist: