@sveltejs/adapter-vercel 2.0.4 → 2.1.1
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 +8 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -216,11 +216,6 @@ const plugin = function (defaults = {}) {
|
|
|
216
216
|
/** @type {import('@sveltejs/kit').RouteDefinition<any>[]} */ (group.routes)
|
|
217
217
|
);
|
|
218
218
|
|
|
219
|
-
if (singular) {
|
|
220
|
-
// Special case: One function for all routes
|
|
221
|
-
static_config.routes.push({ src: '/.*', dest: `/${name}` });
|
|
222
|
-
}
|
|
223
|
-
|
|
224
219
|
for (const route of group.routes) {
|
|
225
220
|
functions.set(route.pattern.toString(), name);
|
|
226
221
|
}
|
|
@@ -286,6 +281,12 @@ const plugin = function (defaults = {}) {
|
|
|
286
281
|
}
|
|
287
282
|
}
|
|
288
283
|
|
|
284
|
+
if (singular) {
|
|
285
|
+
// Common case: One function for all routes
|
|
286
|
+
// Needs to happen after ISR or else regex swallows all other matches
|
|
287
|
+
static_config.routes.push({ src: '/.*', dest: `/fn` });
|
|
288
|
+
}
|
|
289
|
+
|
|
289
290
|
builder.log.minor('Copying assets...');
|
|
290
291
|
|
|
291
292
|
builder.writeClient(dirs.static);
|
|
@@ -487,7 +488,8 @@ async function create_function_bundle(builder, entry, dir, config) {
|
|
|
487
488
|
memory: config.memory,
|
|
488
489
|
maxDuration: config.maxDuration,
|
|
489
490
|
handler: path.relative(base + ancestor, entry),
|
|
490
|
-
launcherType: 'Nodejs'
|
|
491
|
+
launcherType: 'Nodejs',
|
|
492
|
+
experimentalResponseStreaming: !config.isr
|
|
491
493
|
},
|
|
492
494
|
null,
|
|
493
495
|
'\t'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/adapter-vercel",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^16.18.6",
|
|
31
31
|
"typescript": "^4.9.4",
|
|
32
|
-
"@sveltejs/kit": "^1.
|
|
32
|
+
"@sveltejs/kit": "^1.8.3"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@sveltejs/kit": "^1.5.0"
|