Skip to content

Unexpected routing behavior for api sub-routes #12

@jahands

Description

@jahands

A behavior I found unexpected is the way API routes match splats without using the normal flat routes syntax for splats.

To match the following routes:

/api
/api/foo
/api/foo/bar

I'd expect to create routes/api.$.ts based on the docs for splat routes, but instead I must create routes/api.ts

Why don't API routes use the normal routing syntax?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions