@sveltejs/adapter-vercel 2.1.0 → 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.
Files changed (2) hide show
  1. package/index.js +7 -6
  2. package/package.json +1 -1
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);
@@ -488,7 +489,7 @@ async function create_function_bundle(builder, entry, dir, config) {
488
489
  maxDuration: config.maxDuration,
489
490
  handler: path.relative(base + ancestor, entry),
490
491
  launcherType: 'Nodejs',
491
- experimentalResponseStreaming: true
492
+ experimentalResponseStreaming: !config.isr
492
493
  },
493
494
  null,
494
495
  '\t'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/adapter-vercel",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",