Routing and using special characters with <FileRoutes>

When using <FileRoutes> I that both: - routes/[login, register].tsx multiple routes to one handler - routes/*any.tsx wildcard routes Work as expected. However, my file naming eduction dates back to Windows in the 1990's when such names would not have worked (or that is how I remember things). I'm wondering if anyone can tell me the advisability of using these file names and related routes when deploying a SolidStart app. Will names with [], , and/or * work reliably or, if I wanted to use this router features, should I use component or config routing instead.
2 Replies
peerreynders
peerreynders•6mo ago
What is your build environment going to be? The Windows/macOS footgun tends to be case insensitivity. Also the length of your routing expression better fit into 255 bytes (linux filename limit). In most cases it shouldn't be a problem; that doesn't mean some people won't run into edge cases but I don't think that is enough to abandon file-based routing altogether.
Carl (klequis)
Carl (klequis)OP•6mo ago
The question relates to a SolidStart routing tutorial I'm writing so no actual deployment. I noticed that the Solid Router doc has this patterns documented but in the <FileRoutes> doc they are not. So the question is me questioning if I should include these patterns in the tutorial or not. I spend 10 years making Windows apps and don't miss the footgun even a little bit. 🙂
Want results from more Discord servers?
Add your server