Skip to content

Commit

Permalink
fix: catch-all server side handler (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerioageno authored Jan 4, 2025
1 parent 1356be2 commit 91236e5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/tuono-fs-router-vite-plugin/src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ async function getRouteNodes(
} else if (fullPath.match(/\.(rs)$/)) {
const filePath = replaceBackslash(path.join(dir, dirent.name))
const filePathNoExt = removeExt(filePath)
let routePath =
cleanPath(`/${filePathNoExt.split('.').join('/')}`) || ''
let routePath = cleanPath(`/${filePathNoExt}`) || ''

if (routePath === 'index') {
routePath = '/'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const IndexRoute = Index.update({
const PostscatchallRoute = Postscatchall.update({
path: '/posts/[...catch_all]',
getParentRoute: () => rootRoute,
hasHandler: true,
})

// Create and export the route tree
Expand Down

0 comments on commit 91236e5

Please sign in to comment.