T
TanStack17mo ago
fair-rose

How can I combine file based routing with external stylesheets?

How can I prevent that routeTree.gen.ts creates a route for the stylesheet? If I use exernal stylsheets for my pages, I get things like this in the routeTree.gen.ts:
const ContactsIndexStyleRoute = ContactsIndexStyleImport.update({
path: '/contacts/index/style',
getParentRoute: () => rootRoute,
} as any);
const ContactsIndexStyleRoute = ContactsIndexStyleImport.update({
path: '/contacts/index/style',
getParentRoute: () => rootRoute,
} as any);
how can I prevent this from happening?
2 Replies
fascinating-indigo
fascinating-indigo17mo ago
check the documentation https://tanstack.com/router/v1/docs/framework/react/guide/file-based-routing#options one of the following options might help: - routeFileIgnorePrefix - routeFileIgnorePattern
File-Based Routes | TanStack Router React Docs
Most of the TanStack Router documentation is written for file-based routing. This guide is mostly intended to help you understand in more detail how to configure file-based routing and the technical details behind how it works. Prerequisites
fair-rose
fair-roseOP17mo ago
thanks

Did you find this page helpful?