Describe the bug
An App that's deployed to vercel using @sveltejs/adapter-vercel will break if it is both:
- Using the
reroute hook
- Deployed as multiple functions, either because the project is large or it is using
split: true
When hitting a route that should get rerouted, it will instead return a 404.
This has caused the localised routing provided by @inlang/paraglide-sveltekit to break when deployed to Vercel. opral/paraglide-js#32
Reproduction
Repo: https://github.com/LorisSigrist/sveltekit-adapter-vercel-rerotute-bug-reproduction
Deployment: https://sveltekit-adapter-vercel-rerotute-bug-reproduction.vercel.app/
The route /some-page should get rerouted to /, but isn't in production. Instead a 404 is returned
Logs
No response
System Info
System:
OS: macOS 14.3.1
CPU: (14) arm64 Apple M3 Max
Memory: 2.08 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.19.1 - /opt/homebrew/bin/node
npm: 10.2.4 - /opt/homebrew/bin/npm
pnpm: 8.15.3 - /opt/homebrew/bin/pnpm
Browsers:
Safari: 17.3.1
npmPackages:
@sveltejs/adapter-vercel: ^5.1.0 => 5.1.0
@sveltejs/kit: ^2.0.0 => 2.5.0
@sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2
svelte: ^4.2.7 => 4.2.11
vite: ^5.0.3 => 5.1.4
Severity
blocking all usage of SvelteKit (on Vercel)
Additional Information
No response
Describe the bug
An App that's deployed to vercel using
@sveltejs/adapter-vercelwill break if it is both:reroutehooksplit: trueWhen hitting a route that should get rerouted, it will instead return a 404.
This has caused the localised routing provided by
@inlang/paraglide-sveltekitto break when deployed to Vercel. opral/paraglide-js#32Reproduction
Repo: https://github.com/LorisSigrist/sveltekit-adapter-vercel-rerotute-bug-reproduction
Deployment: https://sveltekit-adapter-vercel-rerotute-bug-reproduction.vercel.app/
The route
/some-pageshould get rerouted to/, but isn't in production. Instead a 404 is returnedLogs
No response
System Info
System: OS: macOS 14.3.1 CPU: (14) arm64 Apple M3 Max Memory: 2.08 GB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.19.1 - /opt/homebrew/bin/node npm: 10.2.4 - /opt/homebrew/bin/npm pnpm: 8.15.3 - /opt/homebrew/bin/pnpm Browsers: Safari: 17.3.1 npmPackages: @sveltejs/adapter-vercel: ^5.1.0 => 5.1.0 @sveltejs/kit: ^2.0.0 => 2.5.0 @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2 svelte: ^4.2.7 => 4.2.11 vite: ^5.0.3 => 5.1.4Severity
blocking all usage of SvelteKit (on Vercel)
Additional Information
No response