-
I tried as written in this comment and got a result somewhat different (on Windows, Remix
$ npx remix routes
<Routes>
<Route file="root.tsx">
<Route path="index" file="routes\\_app\\index.tsx" />
<Route index file="routes\\_app._index\\index.tsx" />
</Route>
</Routes> What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I believe there's a bug in the Remix
If you use folders for organization, For index routes, With Hope this helps. |
Beta Was this translation helpful? Give feedback.
I believe there's a bug in the Remix
v2
routing.remix-flat-routes
treats this correctly._app/index.tsx
is the layout route for_app
(flat-folder) same as_app.tsx
_app/_index/index.tsx
is the index route ... same asapp._index.tsx
If you use folders for organization,
remix-flat-routes
will assume you're usingflat-folders
, so it looks for the route file from the immediate children. Inv2
convention, this can only beindex.tsx
orroute.tsx
. Withremix-flat-routes
, I've extended it so it canindex|page|route|layout
or any (tsx/jsx/mdx) file starting with a leading_
.For index routes,
v2
convention requires it to be named_index
. An index route is the default route for a given path, like/
…