@vercel/next 4.10.1 → 4.10.2

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/dist/index.js +28 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15168,11 +15168,11 @@ ${JSON.stringify(
15168
15168
  }
15169
15169
  if (appPathRoutesManifest) {
15170
15170
  const edgeFunctions = middleware.edgeFunctions;
15171
- for (const route of Object.values(appPathRoutesManifest)) {
15171
+ for (const page of Object.values(appPathRoutesManifest)) {
15172
15172
  const pathname = import_path4.default.posix.join(
15173
15173
  "./",
15174
15174
  entryDirectory,
15175
- route === "/" ? "/index" : route
15175
+ page === "/" ? "/index" : page
15176
15176
  );
15177
15177
  if (lambdas[pathname]) {
15178
15178
  lambdas[`${pathname}.rsc`] = lambdas[pathname];
@@ -15187,6 +15187,32 @@ ${JSON.stringify(
15187
15187
  }
15188
15188
  }
15189
15189
  }
15190
+ for (const route of routesManifest.dynamicRoutes) {
15191
+ if (!("sourcePage" in route))
15192
+ continue;
15193
+ if (typeof route.sourcePage !== "string")
15194
+ continue;
15195
+ if (route.sourcePage === route.page)
15196
+ continue;
15197
+ const sourcePathname = import_path4.default.posix.join(
15198
+ "./",
15199
+ entryDirectory,
15200
+ route.sourcePage === "/" ? "/index" : route.sourcePage
15201
+ );
15202
+ const pathname = import_path4.default.posix.join(
15203
+ "./",
15204
+ entryDirectory,
15205
+ route.page === "/" ? "/index" : route.page
15206
+ );
15207
+ if (lambdas[sourcePathname]) {
15208
+ lambdas[`${pathname}.rsc`] = lambdas[sourcePathname];
15209
+ lambdas[`${pathname}${RSC_PREFETCH_SUFFIX}`] = lambdas[sourcePathname];
15210
+ }
15211
+ if (edgeFunctions[sourcePathname]) {
15212
+ edgeFunctions[`${pathname}.rsc`] = edgeFunctions[sourcePathname];
15213
+ edgeFunctions[`${pathname}${RSC_PREFETCH_SUFFIX}`] = edgeFunctions[sourcePathname];
15214
+ }
15215
+ }
15190
15216
  }
15191
15217
  const prefetchSegmentHeader = routesManifest?.rsc?.prefetchSegmentHeader;
15192
15218
  const prefetchSegmentDirSuffix = routesManifest?.rsc?.prefetchSegmentDirSuffix;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.10.1",
3
+ "version": "4.10.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",