@sveltejs/adapter-vercel
Advanced tools
Comparing version 1.0.0-next.81 to 1.0.0-next.82
78
index.js
@@ -7,79 +7,2 @@ import fs from 'fs'; | ||
// rules for clean URLs and trailing slash handling, | ||
// generated with @vercel/routing-utils | ||
const redirects = { | ||
always: [ | ||
{ | ||
src: '^/(?:(.+)/)?index(?:\\.html)?/?$', | ||
headers: { | ||
Location: '/$1/' | ||
}, | ||
status: 308 | ||
}, | ||
{ | ||
src: '^/(.*)\\.html/?$', | ||
headers: { | ||
Location: '/$1/' | ||
}, | ||
status: 308 | ||
}, | ||
{ | ||
src: '^/\\.well-known(?:/.*)?$' | ||
}, | ||
{ | ||
src: '^/((?:[^/]+/)*[^/\\.]+)$', | ||
headers: { | ||
Location: '/$1/' | ||
}, | ||
status: 308 | ||
}, | ||
{ | ||
src: '^/((?:[^/]+/)*[^/]+\\.\\w+)/$', | ||
headers: { | ||
Location: '/$1' | ||
}, | ||
status: 308 | ||
} | ||
], | ||
never: [ | ||
{ | ||
src: '^/(?:(.+)/)?index(?:\\.html)?/?$', | ||
headers: { | ||
Location: '/$1' | ||
}, | ||
status: 308 | ||
}, | ||
{ | ||
src: '^/(.*)\\.html/?$', | ||
headers: { | ||
Location: '/$1' | ||
}, | ||
status: 308 | ||
}, | ||
{ | ||
src: '^/(.*)/$', | ||
headers: { | ||
Location: '/$1' | ||
}, | ||
status: 308 | ||
} | ||
], | ||
ignore: [ | ||
{ | ||
src: '^/(?:(.+)/)?index(?:\\.html)?/?$', | ||
headers: { | ||
Location: '/$1' | ||
}, | ||
status: 308 | ||
}, | ||
{ | ||
src: '^/(.*)\\.html/?$', | ||
headers: { | ||
Location: '/$1' | ||
}, | ||
status: 308 | ||
} | ||
] | ||
}; | ||
/** @type {import('.').default} **/ | ||
@@ -119,3 +42,2 @@ export default function ({ external = [], edge, split } = {}) { | ||
const routes = [ | ||
...redirects[builder.config.kit.trailingSlash], | ||
...prerendered_redirects, | ||
@@ -122,0 +44,0 @@ { |
{ | ||
"name": "@sveltejs/adapter-vercel", | ||
"version": "1.0.0-next.81", | ||
"version": "1.0.0-next.82", | ||
"repository": { | ||
@@ -30,3 +30,3 @@ "type": "git", | ||
"devDependencies": { | ||
"@sveltejs/kit": "1.0.0-next.529", | ||
"@sveltejs/kit": "1.0.0-next.554", | ||
"@types/node": "^16.11.68", | ||
@@ -33,0 +33,0 @@ "typescript": "^4.8.4" |
13473
316