-
I can't seem to get "catch all" routes to work (i.e. For the "catch all" route of // [...slug].ts
export default function handler(req: VercelRequest, res: VercelResponse) {
res.json(req.query)
} With that being said, I get the following responses from the api:
With a file name of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Could this be a bug in how Vercel parses the |
Beta Was this translation helpful? Give feedback.
-
Hi @qodesmith! The documentation you linked to is for Next.js, but your project does not seem to be a Next.js project. The catch all API route behavior is a Next.js feature. I think it's possible build something to achieve a similar effect with Vite and other frameworks, but it would require some complex customization. I don't know enough about Vite to be able to offer specific advice on that. |
Beta Was this translation helpful? Give feedback.
Hi @qodesmith! The documentation you linked to is for Next.js, but your project does not seem to be a Next.js project. The catch all API route behavior is a Next.js feature.
I think it's possible build something to achieve a similar effect with Vite and other frameworks, but it would require some complex customization. I don't know enough about Vite to be able to offer specific advice on that.