@vercel/next 4.0.16 → 4.0.17
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 +31 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -10707,7 +10707,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
10707
10707
|
isAppPathRoute = true;
|
10708
10708
|
}
|
10709
10709
|
const isOmittedOrNotFound = isOmitted || isNotFound;
|
10710
|
-
let htmlFsRef;
|
10710
|
+
let htmlFsRef = null;
|
10711
10711
|
let prerender;
|
10712
10712
|
if (experimentalPPR && appDir) {
|
10713
10713
|
const htmlPath = import_path2.default.join(appDir, `${routeFileNoExt}.html`);
|
@@ -12017,6 +12017,19 @@ async function serverBuild({
|
|
12017
12017
|
value.contentType = rscContentTypeHeader;
|
12018
12018
|
}
|
12019
12019
|
}
|
12020
|
+
for (const rewrite of afterFilesRewrites) {
|
12021
|
+
if (rewrite.src && rewrite.dest) {
|
12022
|
+
rewrite.src = rewrite.src.replace(
|
12023
|
+
"(?:/)?",
|
12024
|
+
"(?<rscsuff>(\\.prefetch)?\\.rsc)?(?:/)?"
|
12025
|
+
);
|
12026
|
+
let destQueryIndex = rewrite.dest.indexOf("?");
|
12027
|
+
if (destQueryIndex === -1) {
|
12028
|
+
destQueryIndex = rewrite.dest.length;
|
12029
|
+
}
|
12030
|
+
rewrite.dest = rewrite.dest.substring(0, destQueryIndex) + "$rscsuff" + rewrite.dest.substring(destQueryIndex);
|
12031
|
+
}
|
12032
|
+
}
|
12020
12033
|
}
|
12021
12034
|
const isCorrectNotFoundRoutes = import_semver3.default.gte(
|
12022
12035
|
nextVersion,
|
@@ -13317,6 +13330,23 @@ async function serverBuild({
|
|
13317
13330
|
// These need to come before handle: miss or else they are grouped
|
13318
13331
|
// with that routing section
|
13319
13332
|
...afterFilesRewrites,
|
13333
|
+
// ensure non-normalized /.rsc from rewrites is handled
|
13334
|
+
...appPathRoutesManifest ? [
|
13335
|
+
{
|
13336
|
+
src: import_path4.default.posix.join("/", entryDirectory, "/\\.prefetch\\.rsc$"),
|
13337
|
+
dest: import_path4.default.posix.join(
|
13338
|
+
"/",
|
13339
|
+
entryDirectory,
|
13340
|
+
`/__index${RSC_PREFETCH_SUFFIX}`
|
13341
|
+
),
|
13342
|
+
check: true
|
13343
|
+
},
|
13344
|
+
{
|
13345
|
+
src: import_path4.default.posix.join("/", entryDirectory, "/\\.rsc$"),
|
13346
|
+
dest: import_path4.default.posix.join("/", entryDirectory, `/index.rsc`),
|
13347
|
+
check: true
|
13348
|
+
}
|
13349
|
+
] : [],
|
13320
13350
|
{ handle: "resource" },
|
13321
13351
|
...fallbackRewrites,
|
13322
13352
|
// make sure 404 page is used when a directory is matched without
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.17",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"dist"
|
14
14
|
],
|
15
15
|
"dependencies": {
|
16
|
-
"@vercel/nft": "0.
|
16
|
+
"@vercel/nft": "0.26.2"
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@types/aws-lambda": "8.10.19",
|