@sveltejs/adapter-vercel 5.4.5 → 5.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +11 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -444,7 +444,17 @@ function static_vercel_config(builder, config, dir) {
|
|
|
444
444
|
/** @type {import('./index.js').ImagesConfig | undefined} */
|
|
445
445
|
const images = config.images;
|
|
446
446
|
|
|
447
|
-
for (
|
|
447
|
+
for (let [src, redirect] of builder.prerendered.redirects) {
|
|
448
|
+
if (src.replace(/\/$/, '') === redirect.location.replace(/\/$/, '')) {
|
|
449
|
+
// ignore the extreme edge case of a `/foo` -> `/foo/` redirect,
|
|
450
|
+
// which would only arise if the response was generated by a
|
|
451
|
+
// `handle` hook or outside the app altogether (since you
|
|
452
|
+
// can't declaratively create both routes)
|
|
453
|
+
} else {
|
|
454
|
+
// redirect both `/foo` and `/foo/` to `redirect.location`
|
|
455
|
+
src = src.replace(/\/?$/, '/?');
|
|
456
|
+
}
|
|
457
|
+
|
|
448
458
|
prerendered_redirects.push({
|
|
449
459
|
src,
|
|
450
460
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-vercel",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.7",
|
|
4
4
|
"description": "A SvelteKit adapter that creates a Vercel app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"directory": "packages/adapter-vercel"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"homepage": "https://
|
|
19
|
+
"homepage": "https://svelte.dev",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "^18.19.48",
|
|
42
42
|
"typescript": "^5.3.3",
|
|
43
43
|
"vitest": "^2.0.1",
|
|
44
|
-
"@sveltejs/kit": "^2.
|
|
44
|
+
"@sveltejs/kit": "^2.8.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@sveltejs/kit": "^2.4.0"
|