-
Notifications
You must be signed in to change notification settings - Fork 128
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
Combination of index route and dynamic route doesn't seem to get resolved properly #23
Comments
It works, can you provide more context? |
A simple repro would be:
Observe how the dynamic route is being used instead of the newly created index route |
That is // add to main.ts
routes[0].children.forEach((i: any) => {
i.path = i.path.substring(1)
if (i.path.endsWith('?'))
i.path = i.path.slice(0, -1)
}) P.S. That didn't handle deep routes |
Thank you. This has worked. Do you want me to open an issue on |
Ok, then I will close this one. |
I'm also running into this issue and I'm not using My
And these are my generated routes: [
{ "name": "notfound", "path": "/:notfound(.*)" },
{ "name": "index", "path": "/" },
// This route is always being matched:
{ "name": "things-thing", "path": "/things/:thing?" },
{ "name": "things", "path": "/things" }
] Edit: Manually removing the |
Optional parameters is removed from v0.9.0 |
The new version fixed it. Thanks a lot for this great package, @hannoeru! 💚 |
With the above setup of pages, when calling
localhost:3000/menuplan/
it seems that the dynamic route is being used instead of the index route.Am I doing something wrong here?
Version: 0.7.0
The text was updated successfully, but these errors were encountered: