@vercel/next 3.2.9 → 3.2.10
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 +23 -3
- package/dist/server-build.js +23 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -46375,7 +46375,21 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46375
46375
|
}
|
46376
46376
|
}
|
46377
46377
|
}
|
46378
|
-
const rscHeader = routesManifest.rsc?.header || '__rsc__';
|
46378
|
+
const rscHeader = routesManifest.rsc?.header?.toLowerCase() || '__rsc__';
|
46379
|
+
const completeDynamicRoutes = [];
|
46380
|
+
if (appDir) {
|
46381
|
+
for (const route of dynamicRoutes) {
|
46382
|
+
completeDynamicRoutes.push(route);
|
46383
|
+
completeDynamicRoutes.push({
|
46384
|
+
...route,
|
46385
|
+
src: route.src.replace(new RegExp((0, escape_string_regexp_1.default)('(?:/)?$')), '(?:\\.rsc)?(?:/)?$'),
|
46386
|
+
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
46387
|
+
});
|
46388
|
+
}
|
46389
|
+
}
|
46390
|
+
else {
|
46391
|
+
completeDynamicRoutes.push(...dynamicRoutes);
|
46392
|
+
}
|
46379
46393
|
return {
|
46380
46394
|
wildcard: wildcardConfig,
|
46381
46395
|
images: imagesManifest?.images?.loader === 'default'
|
@@ -46507,7 +46521,13 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46507
46521
|
...redirects,
|
46508
46522
|
// middleware comes directly after redirects but before
|
46509
46523
|
// beforeFiles rewrites as middleware is not a "file" route
|
46524
|
+
...(routesManifest?.skipMiddlewareUrlNormalize
|
46525
|
+
? denormalizeNextDataRoute(true)
|
46526
|
+
: []),
|
46510
46527
|
...(isCorrectMiddlewareOrder ? middleware.staticRoutes : []),
|
46528
|
+
...(routesManifest?.skipMiddlewareUrlNormalize
|
46529
|
+
? normalizeNextDataRoute(true)
|
46530
|
+
: []),
|
46511
46531
|
...beforeFilesRewrites,
|
46512
46532
|
// Make sure to 404 for the /404 path itself
|
46513
46533
|
...(i18n
|
@@ -46666,7 +46686,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46666
46686
|
? // when resolving data routes for middleware we need to include
|
46667
46687
|
// all dynamic routes including non-SSG/SSP so that the priority
|
46668
46688
|
// is correct
|
46669
|
-
|
46689
|
+
completeDynamicRoutes
|
46670
46690
|
.map(route => {
|
46671
46691
|
route = Object.assign({}, route);
|
46672
46692
|
let normalizedSrc = route.src;
|
@@ -46712,7 +46732,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46712
46732
|
: []),
|
46713
46733
|
// Dynamic routes (must come after dataRoutes as dataRoutes are more
|
46714
46734
|
// specific)
|
46715
|
-
...
|
46735
|
+
...completeDynamicRoutes,
|
46716
46736
|
...(isNextDataServerResolving
|
46717
46737
|
? [
|
46718
46738
|
{
|
package/dist/server-build.js
CHANGED
@@ -663,7 +663,21 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
663
663
|
}
|
664
664
|
}
|
665
665
|
}
|
666
|
-
const rscHeader = routesManifest.rsc?.header || '__rsc__';
|
666
|
+
const rscHeader = routesManifest.rsc?.header?.toLowerCase() || '__rsc__';
|
667
|
+
const completeDynamicRoutes = [];
|
668
|
+
if (appDir) {
|
669
|
+
for (const route of dynamicRoutes) {
|
670
|
+
completeDynamicRoutes.push(route);
|
671
|
+
completeDynamicRoutes.push({
|
672
|
+
...route,
|
673
|
+
src: route.src.replace(new RegExp((0, escape_string_regexp_1.default)('(?:/)?$')), '(?:\\.rsc)?(?:/)?$'),
|
674
|
+
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
675
|
+
});
|
676
|
+
}
|
677
|
+
}
|
678
|
+
else {
|
679
|
+
completeDynamicRoutes.push(...dynamicRoutes);
|
680
|
+
}
|
667
681
|
return {
|
668
682
|
wildcard: wildcardConfig,
|
669
683
|
images: imagesManifest?.images?.loader === 'default'
|
@@ -795,7 +809,13 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
795
809
|
...redirects,
|
796
810
|
// middleware comes directly after redirects but before
|
797
811
|
// beforeFiles rewrites as middleware is not a "file" route
|
812
|
+
...(routesManifest?.skipMiddlewareUrlNormalize
|
813
|
+
? denormalizeNextDataRoute(true)
|
814
|
+
: []),
|
798
815
|
...(isCorrectMiddlewareOrder ? middleware.staticRoutes : []),
|
816
|
+
...(routesManifest?.skipMiddlewareUrlNormalize
|
817
|
+
? normalizeNextDataRoute(true)
|
818
|
+
: []),
|
799
819
|
...beforeFilesRewrites,
|
800
820
|
// Make sure to 404 for the /404 path itself
|
801
821
|
...(i18n
|
@@ -954,7 +974,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
954
974
|
? // when resolving data routes for middleware we need to include
|
955
975
|
// all dynamic routes including non-SSG/SSP so that the priority
|
956
976
|
// is correct
|
957
|
-
|
977
|
+
completeDynamicRoutes
|
958
978
|
.map(route => {
|
959
979
|
route = Object.assign({}, route);
|
960
980
|
let normalizedSrc = route.src;
|
@@ -1000,7 +1020,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
1000
1020
|
: []),
|
1001
1021
|
// Dynamic routes (must come after dataRoutes as dataRoutes are more
|
1002
1022
|
// specific)
|
1003
|
-
...
|
1023
|
+
...completeDynamicRoutes,
|
1004
1024
|
...(isNextDataServerResolving
|
1005
1025
|
? [
|
1006
1026
|
{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.10",
|
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": "
|
72
|
+
"gitHead": "fbb8bba4cfb06040d62916bdc3fc849ac0b4d074"
|
73
73
|
}
|