hilla icon indicating copy to clipboard operation
hilla copied to clipboard

[file-router] add explicit config to disable file-router completely

Open taefi opened this issue 9 months ago • 2 comments

Describe your motivation

According to the docs, having a routes.tsx file under src/main/frontend/ does not disable file router monitoring of the views directory, but the output is ignored. Due having this defaults, the following situation described in the docs is confusing and unnecessarily limiting, thus undesirable:

In this case, the files in src/main/frontend/views are not used for routing, and you should avoid placing any .tsx/.jsx files there, as they are still interpreted as views by the Hilla router, resulting in unnecessary processing and possible confusion.

Describe the solution you'd like

It would be less limiting if there's an explicit switch to turn of the file-router, so that users can have their tsx/jsx files under views directory freely and with less confusion.

Describe alternatives you've considered

No response

Additional context

No response

taefi avatar Jun 25 '25 08:06 taefi

Let's add a disable flag to application configuration. Seems the simplest option.

platosha avatar Jul 22 '25 11:07 platosha

See also: #3784

platosha avatar Jul 29 '25 11:07 platosha