@sveltejs/adapter-vercel 5.5.3 → 5.6.0
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/index.js +20 -0
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -390,6 +390,26 @@ const plugin = function (defaults = {}) {
|
|
|
390
390
|
);
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
+
// optional chaining to support older versions that don't have this setting yet
|
|
394
|
+
if (builder.config.kit.router?.resolution === 'server') {
|
|
395
|
+
// Create a separate edge function just for server-side route resolution.
|
|
396
|
+
// By omitting all routes we're ensuring it's small (the routes will still be available
|
|
397
|
+
// to the route resolution, becaue it does not rely on the server routing manifest)
|
|
398
|
+
await generate_edge_function(
|
|
399
|
+
`${builder.config.kit.appDir}/routes`,
|
|
400
|
+
{
|
|
401
|
+
external: 'external' in defaults ? defaults.external : undefined,
|
|
402
|
+
runtime: 'edge'
|
|
403
|
+
},
|
|
404
|
+
[]
|
|
405
|
+
);
|
|
406
|
+
|
|
407
|
+
static_config.routes.push({
|
|
408
|
+
src: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/routes(\\.js|/.*)`,
|
|
409
|
+
dest: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/routes`
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
393
413
|
// Catch-all route must come at the end, otherwise it will swallow all other routes,
|
|
394
414
|
// including ISR aliases if there is only one function
|
|
395
415
|
static_config.routes.push({ src: '/.*', dest: `/${DEFAULT_FUNCTION_NAME}` });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-vercel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"description": "A SvelteKit adapter that creates a Vercel app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@sveltejs/vite-plugin-svelte": "^5.0.1",
|
|
42
42
|
"@types/node": "^18.19.48",
|
|
43
43
|
"typescript": "^5.3.3",
|
|
44
|
-
"vitest": "^
|
|
45
|
-
"@sveltejs/kit": "^2.
|
|
44
|
+
"vitest": "^3.0.1",
|
|
45
|
+
"@sveltejs/kit": "^2.17.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@sveltejs/kit": "^2.4.0"
|