@vercel/next 4.0.11 → 4.0.12
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 +17 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -11375,6 +11375,18 @@ async function getServerlessPages(params) {
|
|
11375
11375
|
}
|
11376
11376
|
return { pages, appPaths: normalizedAppPaths };
|
11377
11377
|
}
|
11378
|
+
function normalizePrefetches(prefetches) {
|
11379
|
+
const updatedPrefetches = {};
|
11380
|
+
for (const key in prefetches) {
|
11381
|
+
if (key === "index.prefetch.rsc") {
|
11382
|
+
const newKey = key.replace(/([^/]+\.prefetch\.rsc)$/, "__$1");
|
11383
|
+
updatedPrefetches[newKey] = prefetches[key];
|
11384
|
+
} else {
|
11385
|
+
updatedPrefetches[key] = prefetches[key];
|
11386
|
+
}
|
11387
|
+
}
|
11388
|
+
return updatedPrefetches;
|
11389
|
+
}
|
11378
11390
|
|
11379
11391
|
// src/create-serverless-config.ts
|
11380
11392
|
function getCustomData(importName, target) {
|
@@ -11873,10 +11885,7 @@ async function serverBuild({
|
|
11873
11885
|
appBuildTraces = await (0, import_build_utils2.glob)("**/*.js.nft.json", appDir);
|
11874
11886
|
appRscPrefetches = await (0, import_build_utils2.glob)(`**/*${RSC_PREFETCH_SUFFIX}`, appDir);
|
11875
11887
|
const rscContentTypeHeader = routesManifest?.rsc?.contentTypeHeader || RSC_CONTENT_TYPE;
|
11876
|
-
|
11877
|
-
appRscPrefetches["__index.prefetch.rsc"] = appRscPrefetches["index.prefetch.rsc"];
|
11878
|
-
delete appRscPrefetches["index.prefetch.rsc"];
|
11879
|
-
}
|
11888
|
+
appRscPrefetches = normalizePrefetches(appRscPrefetches);
|
11880
11889
|
for (const value of Object.values(appRscPrefetches)) {
|
11881
11890
|
if (!value.contentType) {
|
11882
11891
|
value.contentType = rscContentTypeHeader;
|
@@ -12608,7 +12617,10 @@ async function serverBuild({
|
|
12608
12617
|
if (routesManifest?.i18n) {
|
12609
12618
|
route = normalizeLocalePath(route, routesManifest.i18n.locales).pathname;
|
12610
12619
|
}
|
12611
|
-
delete lambdas[
|
12620
|
+
delete lambdas[normalizeIndexOutput(
|
12621
|
+
import_path4.default.posix.join("./", entryDirectory, route === "/" ? "/index" : route),
|
12622
|
+
true
|
12623
|
+
)];
|
12612
12624
|
});
|
12613
12625
|
const middleware = await getMiddlewareBundle({
|
12614
12626
|
config,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.12",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@types/semver": "6.0.0",
|
31
31
|
"@types/text-table": "0.2.1",
|
32
32
|
"@types/webpack-sources": "3.2.0",
|
33
|
-
"@vercel/build-utils": "7.2.
|
33
|
+
"@vercel/build-utils": "7.2.3",
|
34
34
|
"@vercel/routing-utils": "3.1.0",
|
35
35
|
"async-sema": "3.0.1",
|
36
36
|
"buffer-crc32": "0.2.13",
|