Skip to content

Commit ce52f9e

Browse files
authored
add leading / to isr routes (#9100)
1 parent 3345b71 commit ce52f9e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/tough-points-arrive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/adapter-vercel': patch
3+
---
4+
5+
fix: add leading / to isr routes

packages/adapter-vercel/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,12 @@ const plugin = function (defaults = {}) {
274274

275275
static_config.routes.push({
276276
src: src + '$',
277-
dest: `${isr_name}${q}`
277+
dest: `/${isr_name}${q}`
278278
});
279279

280280
static_config.routes.push({
281281
src: src + '/__data.json$',
282-
dest: `${isr_name}/__data.json${q}`
282+
dest: `/${isr_name}/__data.json${q}`
283283
});
284284
} else if (!singular) {
285285
static_config.routes.push({ src: src + '(?:/__data.json)?$', dest: `/${name}` });

0 commit comments

Comments
 (0)