Skip to content

Commit

Permalink
chore: warn about kebab-case
Browse files Browse the repository at this point in the history
  • Loading branch information
moshetanzer authored Nov 11, 2024
1 parent 49c1560 commit 82911e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export async function scanServerRoutes(

route = route.replace(/\/index$/, "") || "/";

if (/[a-z]+-[a-z]+/.test(route)) {
console.warn(`Warning: Route "${route}" contains kebab-case parameters which will return 404.`);
}
return {
handler: file.fullPath,
lazy: true,
Expand Down

0 comments on commit 82911e0

Please sign in to comment.