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

[Bug?]: Route with (...) resolved incorrectly #1829

Closed
2 tasks done
yinonburgansky opened this issue Feb 24, 2025 · 0 comments · Fixed by #1834
Closed
2 tasks done

[Bug?]: Route with (...) resolved incorrectly #1829

yinonburgansky opened this issue Feb 24, 2025 · 0 comments · Fixed by #1834
Labels
bug Something isn't working needs triage

Comments

@yinonburgansky
Copy link
Contributor

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

the following file route:

|-- routes/
    |-- product/
        |-- (product)about.tsx

is converted to route:

/productabout

Expected behavior 🤔

expecting:

/product/about

Steps to reproduce 🕹

https://stackblitz.com/edit/github-4r8246qf?file=src%2Fapp.tsx

Context 🔦

having multiple pages with the same name can be confusing
prefixing them with (some name) can help identify them

path: id.replace(/\/\([^)/]+\)/g, "").replace(/\([^)/]+\)/g, "")

maybe something like this instead?

// remove all `(...)` and then remove multiple slashes to account for (nested) route groups
 id.replace(/\([^)/]+\)/g, "").replace(/\/+/g, "/")

Your environment 🌎

@yinonburgansky yinonburgansky added bug Something isn't working needs triage labels Feb 24, 2025
@yinonburgansky yinonburgansky changed the title [Bug?]: Route with () [Bug?]: Route with (...) resolved incorrectly Feb 24, 2025
yinonburgansky added a commit to yinonburgansky/solid-start that referenced this issue Feb 26, 2025
before `/routes/nested/(ignored)route0.tsx` resolved to `nestedroute0`
now it resolves to `nested/route0`.
birkskyum added a commit that referenced this issue Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant