@vercel/next 3.1.18 → 3.1.19

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/dist/index.js CHANGED
@@ -47377,6 +47377,11 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
47377
47377
  const shortPath = edgeFile.replace(/^pages\//, '');
47378
47378
  worker.edgeFunction.name = shortPath;
47379
47379
  source.edgeFunctions[shortPath] = worker.edgeFunction;
47380
+ // we don't add the route for edge functions as these
47381
+ // are already added in the routes-manifest under dynamicRoutes
47382
+ if (worker.type === 'function') {
47383
+ continue;
47384
+ }
47380
47385
  const route = {
47381
47386
  continue: true,
47382
47387
  src: worker.routeSrc,
@@ -47388,14 +47393,9 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
47388
47393
  },
47389
47394
  ],
47390
47395
  };
47391
- if (worker.type === 'function') {
47392
- route.dest = shortPath;
47393
- }
47394
- else {
47395
- route.middlewarePath = shortPath;
47396
- if (isCorrectMiddlewareOrder) {
47397
- route.override = true;
47398
- }
47396
+ route.middlewarePath = shortPath;
47397
+ if (isCorrectMiddlewareOrder) {
47398
+ route.override = true;
47399
47399
  }
47400
47400
  if (routesManifest.version > 3 && isDynamicRoute(worker.page)) {
47401
47401
  source.dynamicRouteMap.set(worker.page, route);
package/dist/utils.js CHANGED
@@ -1457,6 +1457,11 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
1457
1457
  const shortPath = edgeFile.replace(/^pages\//, '');
1458
1458
  worker.edgeFunction.name = shortPath;
1459
1459
  source.edgeFunctions[shortPath] = worker.edgeFunction;
1460
+ // we don't add the route for edge functions as these
1461
+ // are already added in the routes-manifest under dynamicRoutes
1462
+ if (worker.type === 'function') {
1463
+ continue;
1464
+ }
1460
1465
  const route = {
1461
1466
  continue: true,
1462
1467
  src: worker.routeSrc,
@@ -1468,14 +1473,9 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
1468
1473
  },
1469
1474
  ],
1470
1475
  };
1471
- if (worker.type === 'function') {
1472
- route.dest = shortPath;
1473
- }
1474
- else {
1475
- route.middlewarePath = shortPath;
1476
- if (isCorrectMiddlewareOrder) {
1477
- route.override = true;
1478
- }
1476
+ route.middlewarePath = shortPath;
1477
+ if (isCorrectMiddlewareOrder) {
1478
+ route.override = true;
1479
1479
  }
1480
1480
  if (routesManifest.version > 3 && isDynamicRoute(worker.page)) {
1481
1481
  source.dynamicRouteMap.set(worker.page, route);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "3.1.18",
3
+ "version": "3.1.19",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -69,5 +69,5 @@
69
69
  "typescript": "4.5.2",
70
70
  "webpack-sources": "3.2.3"
71
71
  },
72
- "gitHead": "b52d01f809b80734ed1ab61df82f299f11a04720"
72
+ "gitHead": "09c85f63d2aa47c147260d343767f6eea60e352c"
73
73
  }