-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the problem
Thank you for adding the new more type-safe routing features (https://svelte.dev/docs/kit/$app-types), they are much appreciated.
However, some of my apps use a few (group)
paths (https://svelte.dev/docs/kit/advanced-routing#Advanced-layouts-(group)), which I am now forced to include in resolve
calls. Before, I was able to skip it, since it evaluates to the same path anyway.
With a route like: /(admin)/dashboard/+page.svelte
// Before:
resolveRoute("/(admin)/dashboard") -> "/dashboard"
resolveRoute("/dashboard") -> "/dashboard"
// Now:
resolve("/(admin)/dashboard") -> "/dashboard"
resolve("/dashboard") -> Type Error
This shortens the lines in the template and makes it easier to see where the link is going.
Describe the proposed solution
I would like to see versions of the paths with (group)
s removed in the Pathname
type.
I personally would even be okay if the (group)
versions were dropped completely. At the moment, the existence of them allows weird situations like this:
resolve("/") -> "/"
resolve("/(admin)") -> "/" Does not even use `(admin)/+layout.svelte` at all!
Alternatives considered
No response
Importance
nice to have
Additional Information
No response