I have an API that loads test questions like this:
const response = await fetch(/api/study/questions/${testId}?limit=${settings.questions});
File location: src\routes\api\study\questions\[id]\+server.ts
On localhost, that API returns a response. On Vercel, it started returning a 404 less than a week ago.
It's visible in the build logs:
.svelte-kit/output/server/entries/endpoints/api/study/questions/_id_/_server.ts.js
It's visible in the resources tab for the build:
md-link-0 IAD1 Node 22 2.66 MB
What's happening is the dynamic routing is being interpreted literally:
First, was there a change that caused this? Because this was working fine until recently. Second, what changes do I need to make to get Vercel to recognize the dynamic routes?