[FEAT]: Add alternative support for index routes using parentheses

This issue has been tracked since 2022-11-17.

Which scope/s are relevant/related to the feature request?

router

Information

Today, index routes are defined in the routes folder as:

  • src/app/routes/index.ts - /
  • src/app/routes/products/index.ts - /products

This can lead to lots of files with similar names. Consider adding support for filenames enclosed in characters like parenthesis being treated as index routes

  • src/app/routes/(home).ts - /
  • src/app/products/(products-home).ts - /products

One caveat is that we could support auxiliary routes in the future, which currently use parentheses in the URL, so we may need to use different characters

Original credit goes to the SolidJS project for the idea.

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
More Details About Repo
Owner Name analogjs
Repo Name analog
Full Name analogjs/analog
Language TypeScript
Created Date 2022-07-06
Updated Date 2023-03-28
Star Count 885
Watcher Count 18
Fork Count 67
Issue Count 33

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date