Skip to content

fix: correct edge function path for route resolution endpoint #13409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/healthy-bees-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-vercel': patch
---

fix: correct edge function path for route resolution endpoint
8 changes: 4 additions & 4 deletions packages/adapter-vercel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ const plugin = function (defaults = {}) {
if (builder.config.kit.router?.resolution === 'server') {
// Create a separate edge function just for server-side route resolution.
// By omitting all routes we're ensuring it's small (the routes will still be available
// to the route resolution, becaue it does not rely on the server routing manifest)
// to the route resolution, because it does not rely on the server routing manifest)
await generate_edge_function(
`${builder.config.kit.appDir}/routes`,
`${builder.config.kit.appDir}/route`,
{
external: 'external' in defaults ? defaults.external : undefined,
runtime: 'edge'
Expand All @@ -405,8 +405,8 @@ const plugin = function (defaults = {}) {
);

static_config.routes.push({
src: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/routes(\\.js|/.*)`,
dest: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/routes`
src: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/route(\\.js|/.*)`,
dest: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/route`
});
}

Expand Down
Loading