Findings No. 50
A per-route function config on Vercel can split a SvelteKit build and 404 the whole site
One route's export const config for a longer maxDuration split the Vercel build, and unmatched paths went to a near-empty function: every language page 404'd.
In a SvelteKit app on Vercel, giving one route its own function config does more than configure that route. It splits the build into separate functions, and that can change where every other request goes.
On the CCRTA website, a prototype endpoint for translated route brochures needed a longer maxDuration, so the route added export const config. The build split into separate functions, and unmatched paths were routed to a nearly empty catch-all function. Every /<lang>/ page on the site returned 404. It was reverted the same day (#155).
The feature shipped again in #156 with no per-route config: the function settings moved into the SvelteKit adapter's options, which apply to the whole build without splitting it. The project's CLAUDE.md now records this as a hard rule, and lj-website configures its runtime the same way, through the adapter options.
The general rule: on Vercel with SvelteKit's adapter, put function settings such as maxDuration and memory in the adapter options. A per-route export const config looks local but can take down the entire site.
Receipt: CCRTA Website pull requests #154 (the outage), #155 (revert) and #156 (reshipped, commit be7b3d5); FINDINGS.md, "Vercel / CDN / platform headers".