kiliman / remix-flat-routes

Remix package to define routes using the flat-routes convention
MIT License
640 stars 22 forks source link

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

Closed adaboese closed 6 months ago

adaboese commented 6 months ago

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.

kiliman commented 6 months ago

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.

adaboese commented 6 months ago

ah, got it. Thank you!