T
TanStack•15h ago
optimistic-gold

How to ignore test files in routes directory?

Tanstack Router is picking up my test files in the routes folder. I there any way to ignore them? No, I don't want to move them elsewhere.
Route file "/home/**/src/routes/index.test.tsx" does not contain any route piece. This is likely a mistake.
Route file "/home/**/src/routes/index.test.tsx" does not contain any route piece. This is likely a mistake.
7 Replies
harsh-harlequin
harsh-harlequin•15h ago
File-Based Routing API Reference | TanStack Router Docs
TanStack Router's file-based routing is quite flexible and can be configured to suit your project's needs. Configuration options The following options are available for configuring the file-based rout...
harsh-harlequin
harsh-harlequin•15h ago
File-Based Routing API Reference | TanStack Router Docs
TanStack Router's file-based routing is quite flexible and can be configured to suit your project's needs. Configuration options The following options are available for configuring the file-based rout...
optimistic-gold
optimistic-goldOP•15h ago
The docs doesn't really help me where to apply these config options, but not in createRouter.
harsh-harlequin
harsh-harlequin•15h ago
for start, those options go into the vite plugin under router
optimistic-gold
optimistic-goldOP•15h ago
ah ok, that makes sense, what I found was start.config.js, but I don;t have such 🙂
harsh-harlequin
harsh-harlequin•15h ago
where do the docs mention this file? needs to be removed then
optimistic-gold
optimistic-goldOP•15h ago
not docs, found it by googling somewhere, closed already

Did you find this page helpful?