-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
route.tsx
changes whether trailing slashes are required in links to index.tsx
#1596
Comments
fyi, I have a similar setup but we use https://stackblitz.com/edit/github-fzqvge-yfunzp?file=src%2Fmain.tsx,src%2Froutes%2F__root.tsx basically, without an There seems to be an additional bug though with the types when there is just an
note that the @chorobin this might be something to look at |
I think it's a bug in the generator. We moved the full path logic to there instead of TS doing it. And before I think TS was removing trailing slashes for |
We did see some new type errors after upgrading to v1.32.2 which led me to this experiment, so quite possibly yes. (I did not test this with pre-v1.32.2.) |
Yep. I know where to fix it. Will get a pr up. Not all index routes should have a trailing slash I guess. Only those that uniquely identified by one |
Describe the bug
With file-based routing,
foo/route.tsx
changes whether links tofoo/index.tsx
must be/foo/
or/foo
:foo/route.tsx
does not exist,foo/index.tsx
can be linked to only with/foo/
, not/foo
.foo/route.tsx
does exist,foo/index.tsx
can be linked to only with/foo
, not/foo/
.Your Example Website or App
https://stackblitz.com/edit/github-fzqvge?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug or Issue
index.tsx
, create aroute.tsx
.Expected behavior
In the given StackBlitz example, I expected either
i.e. I did not expect the presence of
route.tsx
to change the links toindex.tsx
.Screenshots or Videos
Platform
StackBlitz
Additional context
No response
The text was updated successfully, but these errors were encountered: