kiliman / remix-flat-routes

Remix package to define routes using the flat-routes convention

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$.tsx route does not work when nested under layout route

adaboese opened this issue · comments

I have routes:

/_public/_layout.tsx
/_public/$.tsx

I would expect that $.tsx here captures all 404 pages. However, $.tsx is not matched when it is nested under _public.

Meanwhile, this does work:

/$.tsx

But that way I am missing the _public layout which I want to use for this page.

You need to include the + suffix on the _public folder. The + indicates nested folders; without the +, it is a colocated folder, and the $.tsx file is not treated as a route file.

ah, got it. Thank you!