@vercel/next 4.10.1 → 4.10.3
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 +36 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13009,7 +13009,13 @@ async function getNodeMiddleware({
|
|
|
13009
13009
|
import_path2.default.join(entryPath, outputDirectory)
|
|
13010
13010
|
)
|
|
13011
13011
|
})}`
|
|
13012
|
-
).replace(
|
|
13012
|
+
).replace(
|
|
13013
|
+
"__NEXT_MIDDLEWARE_PATH__",
|
|
13014
|
+
"./" + import_path2.default.posix.join(
|
|
13015
|
+
import_path2.default.posix.relative(projectDir, outputDirectory),
|
|
13016
|
+
`server/middleware.js`
|
|
13017
|
+
)
|
|
13018
|
+
);
|
|
13013
13019
|
const lambda = new import_build_utils.NodejsLambda({
|
|
13014
13020
|
...vercelConfigOpts,
|
|
13015
13021
|
runtime: nodeVersion,
|
|
@@ -15168,11 +15174,11 @@ ${JSON.stringify(
|
|
|
15168
15174
|
}
|
|
15169
15175
|
if (appPathRoutesManifest) {
|
|
15170
15176
|
const edgeFunctions = middleware.edgeFunctions;
|
|
15171
|
-
for (const
|
|
15177
|
+
for (const page of Object.values(appPathRoutesManifest)) {
|
|
15172
15178
|
const pathname = import_path4.default.posix.join(
|
|
15173
15179
|
"./",
|
|
15174
15180
|
entryDirectory,
|
|
15175
|
-
|
|
15181
|
+
page === "/" ? "/index" : page
|
|
15176
15182
|
);
|
|
15177
15183
|
if (lambdas[pathname]) {
|
|
15178
15184
|
lambdas[`${pathname}.rsc`] = lambdas[pathname];
|
|
@@ -15187,6 +15193,32 @@ ${JSON.stringify(
|
|
|
15187
15193
|
}
|
|
15188
15194
|
}
|
|
15189
15195
|
}
|
|
15196
|
+
for (const route of routesManifest.dynamicRoutes) {
|
|
15197
|
+
if (!("sourcePage" in route))
|
|
15198
|
+
continue;
|
|
15199
|
+
if (typeof route.sourcePage !== "string")
|
|
15200
|
+
continue;
|
|
15201
|
+
if (route.sourcePage === route.page)
|
|
15202
|
+
continue;
|
|
15203
|
+
const sourcePathname = import_path4.default.posix.join(
|
|
15204
|
+
"./",
|
|
15205
|
+
entryDirectory,
|
|
15206
|
+
route.sourcePage === "/" ? "/index" : route.sourcePage
|
|
15207
|
+
);
|
|
15208
|
+
const pathname = import_path4.default.posix.join(
|
|
15209
|
+
"./",
|
|
15210
|
+
entryDirectory,
|
|
15211
|
+
route.page === "/" ? "/index" : route.page
|
|
15212
|
+
);
|
|
15213
|
+
if (lambdas[sourcePathname]) {
|
|
15214
|
+
lambdas[`${pathname}.rsc`] = lambdas[sourcePathname];
|
|
15215
|
+
lambdas[`${pathname}${RSC_PREFETCH_SUFFIX}`] = lambdas[sourcePathname];
|
|
15216
|
+
}
|
|
15217
|
+
if (edgeFunctions[sourcePathname]) {
|
|
15218
|
+
edgeFunctions[`${pathname}.rsc`] = edgeFunctions[sourcePathname];
|
|
15219
|
+
edgeFunctions[`${pathname}${RSC_PREFETCH_SUFFIX}`] = edgeFunctions[sourcePathname];
|
|
15220
|
+
}
|
|
15221
|
+
}
|
|
15190
15222
|
}
|
|
15191
15223
|
const prefetchSegmentHeader = routesManifest?.rsc?.prefetchSegmentHeader;
|
|
15192
15224
|
const prefetchSegmentDirSuffix = routesManifest?.rsc?.prefetchSegmentDirSuffix;
|
|
@@ -15732,7 +15764,7 @@ ${JSON.stringify(
|
|
|
15732
15764
|
if (routesManifest.i18n) {
|
|
15733
15765
|
for (const locale of routesManifest.i18n?.locales || []) {
|
|
15734
15766
|
const prerenderPathname = pathname.replace(
|
|
15735
|
-
|
|
15767
|
+
/\/\$nextLocale/,
|
|
15736
15768
|
`/${locale}`
|
|
15737
15769
|
);
|
|
15738
15770
|
if (prerenders[import_path4.default.join("./", prerenderPathname)]) {
|