0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/e2e/vue-router
Flo ad5b3b7a09
fix(router-generator): type route-group layouts with full path '/' (#8857)
* fix(router-generator): type route-group layouts with full path `'/'`

A pathless layout inside a route group (`/(group)/_layout`) strips down
to `/`, and dropping the trailing slash left `''` in `FileRoutesByPath`.
The router gives that layout the full path `/` at runtime, as it does for
a pathless layout outside a group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(router-generator): a childless route-group layout next to the index route still generates

With route-group layouts now typed with the full path `/`, a layout
without child routes yet (`(group)/_layout.tsx` or `(group)/route.tsx`)
next to `index.tsx` failed generation with "Conflicting configuration
paths", where it used to generate. Pathless and route-group layouts match
no URL of their own, so the full-path uniqueness check skips them, as
#8817 does. This also lets a childless `_auth.tsx` next to the index
route generate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(router-generator): a pathless layout that carries a path still conflicts

`foo/_layout.tsx` without `foo.tsx` is given `path: '/foo'`, so it
matches `/foo` like `(group)/foo.tsx` or `foo_.tsx` does. Main rejected
that pair as conflicting; the previous commit skipped every pathless
layout in the full-path uniqueness check and let both through. Skip only
the layouts the route tree gives no `path`, using the same condition the
tree printer uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(router-generator): keep main's full-path conflicts, change only the types

The route tree lists the index route before a pathless layout, and the
router then matches `/` to a childless `_auth.tsx` instead of the index
route. Main refused that pair; skipping pathless layouts in the
uniqueness check let it through. Keep the check on main's key instead: the
stripped full path, which is `''` for a route group's layout, so a
childless group layout still generates next to the index route as on
main. Only the types use `'/'`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
History 2026-11-03 19:54:33 +01:00
..
basepath-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
basic test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
basic-esbuild-file-based fix(router-plugin): throw on autoCodeSplitting with esbuild (#8852) 2026-11-03 17:11:14 +01:00
basic-file-based-jsx fix(router-generator): type route-group layouts with full path '/' (#8857) 2026-11-03 19:54:33 +01:00
basic-file-based-sfc fix(router-generator): type route-group layouts with full path '/' (#8857) 2026-11-03 19:54:33 +01:00
basic-scroll-restoration test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
basic-virtual-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
basic-virtual-named-export-config-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
basic-vue-query test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
basic-vue-query-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
generator-cli-only test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
js-only-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
rspack-basic-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
rspack-basic-virtual-named-export-config-file-based test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
scroll-restoration-sandbox-vite test: fix Nx sandbox violations in CI tasks (#8400) 2026-09-14 10:54:23 +02:00
sentry-integration test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00
view-transitions test(e2e): let Playwright manage application servers (#8357) 2026-09-14 10:54:23 +02:00