-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Another hacky way to achieve this would be:
However, it should work like in your first screenshot, I'm sad that it doesn't (tried it myself), and I remember finding myself in similar trouble. I hope that this is just a temporary problem in Remix, and I recommend raising an issue about this if there isn't one already. |
Beta Was this translation helpful? Give feedback.
-
I believe it's a bug in Remix. The file layout is simply used to create the config needed by Here's how Remix is seeing the above routes <Routes>
<Route file="root.tsx">
<Route path="blog/" file="routes/blog/__nested.tsx">
<Route path=":id" file="routes/blog/__nested/$id.tsx" />
<Route path="new" file="routes/blog/__nested/new.tsx" />
</Route>
<Route path="blog" index file="routes/blog/index.tsx" />
<Route index file="routes/index.tsx" />
</Route>
</Routes> When it should be like this: <Routes>
<Route file="root.tsx">
<Route path="blog/">
<Route index file="routes/blog/index.tsx" />
<Route file="routes/blog/__nested.tsx">
<Route path=":id" file="routes/blog/__nested/$id.tsx" />
<Route path="new" file="routes/blog/__nested/new.tsx" />
</Route>
</Route>
<Route index file="routes/index.tsx" />
</Route>
</Routes> |
Beta Was this translation helpful? Give feedback.
Another hacky way to achieve this would be:
However, it should work like in your first screenshot, I'm sad that it doesn't (tried it myself), and I remember finding myself in similar trouble. I hope that this is just a temporary problem in Remix, and I recommend raising an issue about this if there isn't one already.