@vercel/next 3.2.1 → 3.2.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.
- package/dist/index.js +19 -9
- package/dist/server-build.js +15 -3
- package/dist/utils.js +4 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -45177,7 +45177,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
45177
45177
|
fileList = [];
|
45178
45178
|
const curPagesDir = isAppPath && appDir ? appDir : pagesDir;
|
45179
45179
|
const pageDir = path_1.default.dirname(path_1.default.join(curPagesDir, originalPagePath));
|
45180
|
-
const normalizedBaseDir = `${baseDir}${baseDir.endsWith(
|
45180
|
+
const normalizedBaseDir = `${baseDir}${baseDir.endsWith(path_1.default.sep) ? '' : path_1.default.sep}`;
|
45181
45181
|
files.forEach((file) => {
|
45182
45182
|
const absolutePath = path_1.default.join(pageDir, file);
|
45183
45183
|
// ensure we don't attempt including files outside
|
@@ -45501,7 +45501,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
45501
45501
|
if (appPathRoutesManifest) {
|
45502
45502
|
// create .rsc variant for app lambdas and edge functions
|
45503
45503
|
// to match prerenders so we can route the same when the
|
45504
|
-
//
|
45504
|
+
// __rsc__ header is present
|
45505
45505
|
const edgeFunctions = middleware.edgeFunctions;
|
45506
45506
|
for (let route of Object.values(appPathRoutesManifest)) {
|
45507
45507
|
route = path_1.default.posix.join('./', route === '/' ? '/index' : route);
|
@@ -45658,6 +45658,12 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
45658
45658
|
.join('|')})?[/]?404/?`,
|
45659
45659
|
status: 404,
|
45660
45660
|
continue: true,
|
45661
|
+
missing: [
|
45662
|
+
{
|
45663
|
+
type: 'header',
|
45664
|
+
key: 'x-prerender-revalidate',
|
45665
|
+
},
|
45666
|
+
],
|
45661
45667
|
},
|
45662
45668
|
]
|
45663
45669
|
: [
|
@@ -45665,6 +45671,12 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
45665
45671
|
src: path_1.default.posix.join('/', entryDirectory, '404/?'),
|
45666
45672
|
status: 404,
|
45667
45673
|
continue: true,
|
45674
|
+
missing: [
|
45675
|
+
{
|
45676
|
+
type: 'header',
|
45677
|
+
key: 'x-prerender-revalidate',
|
45678
|
+
},
|
45679
|
+
],
|
45668
45680
|
},
|
45669
45681
|
]),
|
45670
45682
|
// Make sure to 500 when visiting /500 directly for static 500
|
@@ -45700,7 +45712,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
45700
45712
|
has: [
|
45701
45713
|
{
|
45702
45714
|
type: 'header',
|
45703
|
-
key: '
|
45715
|
+
key: '__rsc__',
|
45704
45716
|
},
|
45705
45717
|
],
|
45706
45718
|
dest: path_1.default.posix.join('/', entryDirectory, '/$1.rsc'),
|
@@ -47066,7 +47078,7 @@ const onPrerenderRouteInitial = (prerenderManifest, canUsePreviewMode, entryDire
|
|
47066
47078
|
exports.onPrerenderRouteInitial = onPrerenderRouteInitial;
|
47067
47079
|
let prerenderGroup = 1;
|
47068
47080
|
const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFallback, isOmitted, locale, }) => {
|
47069
|
-
const { appDir, pagesDir,
|
47081
|
+
const { appDir, pagesDir, static404Page, entryDirectory, prerenderManifest, isSharedLambdas, isServerMode, canUsePreviewMode, lambdas, prerenders, pageLambdaMap, routesManifest, isCorrectNotFoundRoutes, isEmptyAllowQueryForPrendered, } = prerenderRouteArgs;
|
47070
47082
|
if (isBlocking && isFallback) {
|
47071
47083
|
throw new build_utils_1.NowBuildError({
|
47072
47084
|
code: 'NEXT_ISBLOCKING_ISFALLBACK',
|
@@ -47190,11 +47202,9 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
47190
47202
|
message: 'invariant: htmlFsRef != null && jsonFsRef != null',
|
47191
47203
|
});
|
47192
47204
|
}
|
47193
|
-
//
|
47194
|
-
//
|
47195
|
-
|
47196
|
-
// on the URL path
|
47197
|
-
if (!canUsePreviewMode || (hasPages404 && routeKey === '/404')) {
|
47205
|
+
// if preview mode/On-Demand ISR can't be leveraged
|
47206
|
+
// we can output pure static outputs instead of prerenders
|
47207
|
+
if (!canUsePreviewMode) {
|
47198
47208
|
htmlFsRef.contentType = _1.htmlContentType;
|
47199
47209
|
prerenders[outputPathPage] = htmlFsRef;
|
47200
47210
|
prerenders[outputPathData] = jsonFsRef;
|
package/dist/server-build.js
CHANGED
@@ -328,7 +328,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
328
328
|
fileList = [];
|
329
329
|
const curPagesDir = isAppPath && appDir ? appDir : pagesDir;
|
330
330
|
const pageDir = path_1.default.dirname(path_1.default.join(curPagesDir, originalPagePath));
|
331
|
-
const normalizedBaseDir = `${baseDir}${baseDir.endsWith(
|
331
|
+
const normalizedBaseDir = `${baseDir}${baseDir.endsWith(path_1.default.sep) ? '' : path_1.default.sep}`;
|
332
332
|
files.forEach((file) => {
|
333
333
|
const absolutePath = path_1.default.join(pageDir, file);
|
334
334
|
// ensure we don't attempt including files outside
|
@@ -652,7 +652,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
652
652
|
if (appPathRoutesManifest) {
|
653
653
|
// create .rsc variant for app lambdas and edge functions
|
654
654
|
// to match prerenders so we can route the same when the
|
655
|
-
//
|
655
|
+
// __rsc__ header is present
|
656
656
|
const edgeFunctions = middleware.edgeFunctions;
|
657
657
|
for (let route of Object.values(appPathRoutesManifest)) {
|
658
658
|
route = path_1.default.posix.join('./', route === '/' ? '/index' : route);
|
@@ -809,6 +809,12 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
809
809
|
.join('|')})?[/]?404/?`,
|
810
810
|
status: 404,
|
811
811
|
continue: true,
|
812
|
+
missing: [
|
813
|
+
{
|
814
|
+
type: 'header',
|
815
|
+
key: 'x-prerender-revalidate',
|
816
|
+
},
|
817
|
+
],
|
812
818
|
},
|
813
819
|
]
|
814
820
|
: [
|
@@ -816,6 +822,12 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
816
822
|
src: path_1.default.posix.join('/', entryDirectory, '404/?'),
|
817
823
|
status: 404,
|
818
824
|
continue: true,
|
825
|
+
missing: [
|
826
|
+
{
|
827
|
+
type: 'header',
|
828
|
+
key: 'x-prerender-revalidate',
|
829
|
+
},
|
830
|
+
],
|
819
831
|
},
|
820
832
|
]),
|
821
833
|
// Make sure to 500 when visiting /500 directly for static 500
|
@@ -851,7 +863,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
851
863
|
has: [
|
852
864
|
{
|
853
865
|
type: 'header',
|
854
|
-
key: '
|
866
|
+
key: '__rsc__',
|
855
867
|
},
|
856
868
|
],
|
857
869
|
dest: path_1.default.posix.join('/', entryDirectory, '/$1.rsc'),
|
package/dist/utils.js
CHANGED
@@ -1027,7 +1027,7 @@ const onPrerenderRouteInitial = (prerenderManifest, canUsePreviewMode, entryDire
|
|
1027
1027
|
exports.onPrerenderRouteInitial = onPrerenderRouteInitial;
|
1028
1028
|
let prerenderGroup = 1;
|
1029
1029
|
const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFallback, isOmitted, locale, }) => {
|
1030
|
-
const { appDir, pagesDir,
|
1030
|
+
const { appDir, pagesDir, static404Page, entryDirectory, prerenderManifest, isSharedLambdas, isServerMode, canUsePreviewMode, lambdas, prerenders, pageLambdaMap, routesManifest, isCorrectNotFoundRoutes, isEmptyAllowQueryForPrendered, } = prerenderRouteArgs;
|
1031
1031
|
if (isBlocking && isFallback) {
|
1032
1032
|
throw new build_utils_1.NowBuildError({
|
1033
1033
|
code: 'NEXT_ISBLOCKING_ISFALLBACK',
|
@@ -1151,11 +1151,9 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1151
1151
|
message: 'invariant: htmlFsRef != null && jsonFsRef != null',
|
1152
1152
|
});
|
1153
1153
|
}
|
1154
|
-
//
|
1155
|
-
//
|
1156
|
-
|
1157
|
-
// on the URL path
|
1158
|
-
if (!canUsePreviewMode || (hasPages404 && routeKey === '/404')) {
|
1154
|
+
// if preview mode/On-Demand ISR can't be leveraged
|
1155
|
+
// we can output pure static outputs instead of prerenders
|
1156
|
+
if (!canUsePreviewMode) {
|
1159
1157
|
htmlFsRef.contentType = _1.htmlContentType;
|
1160
1158
|
prerenders[outputPathPage] = htmlFsRef;
|
1161
1159
|
prerenders[outputPathData] = jsonFsRef;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.2",
|
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": "053c185481b1fa0f980e3f54c9ecbeda53e7d72b"
|
73
73
|
}
|