Skip to content
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

Trouble with optional route segments when in a folder #28

Closed
corygibbons opened this issue Dec 19, 2022 · 3 comments
Closed

Trouble with optional route segments when in a folder #28

corygibbons opened this issue Dec 19, 2022 · 3 comments

Comments

@corygibbons
Copy link

corygibbons commented Dec 19, 2022

Having some trouble getting the new optional route segments working when nested in a folder:

This gives the output expected:

routes/
  hello.(thing).tsx
  index.tsx
<Routes>
  <Route file="root.tsx">
    <Route path="hello/thing?" file="routes/hello.(thing).tsx" />
    <Route index file="routes/index.tsx" />
  </Route>
</Routes>

However if nested in a folder we lose that route entirely:

routes/
  _folder+/
    hello.(thing).tsx
  index.tsx
<Routes>
  <Route file="root.tsx">
    <Route index file="routes/index.tsx" />
  </Route>
</Routes>

Using remix v1.9.0 + remix-flat-routes v0.5.1

@kiliman
Copy link
Owner

kiliman commented Dec 19, 2022

Ok... aside from the syntax support, I haven't really played with optional routes. Also the + suffix was recently added, so may have issues with the new optional routes as well.

I'll have to see what's going on.

@kiliman
Copy link
Owner

kiliman commented Dec 29, 2022

Fixed in v0.5.6

@corygibbons
Copy link
Author

Working great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants