My routeTree.gen.ts is
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/anlaggningar': typeof AnlaggningarIndexRoute
'/anlaggningar/$slug/info': typeof AnlaggningarSlugInfoRoute
'/anlaggningar/$slug': typeof AnlaggningarSlugIndexRoute
}
This works when generating, however, when building, my routeTree.gen adds trailing slaehses to some routs, like: /anlaggningar/$slug/
which breaks my routing. If I look in my actual route file, its declared export const Route = createFileRoute('/anlaggningar/$slug/')({
If I remove the trailing slash, tanstack code generatyion adds it again. With it there, I cant build my app, but without it, it works. How can I make it not add trailing slashes?
I have tried the router settings 'trailingSlash' property, but it doesnt seem to do anything in this case. I just want it to stop generating trailing slashes where they are not needed? Especially since they seem to be inconsistent, for some reason, whoch causes problems. Generated file has:
'/anlaggningar/$slug/info': typeof AnlaggningarSlugInfoRoute # no slash
'/anlaggningar/$slug/': typeof AnlaggningarSlugIndexRoute # has slash