@vercel/next 3.6.7 → 3.7.1
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 +5 -3
- package/dist/utils.js +5 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -40385,20 +40385,17 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
|
|
40385
40385
|
}
|
40386
40386
|
const env = { ...spawnOpts.env };
|
40387
40387
|
env.NEXT_EDGE_RUNTIME_PROVIDER = 'vercel';
|
40388
|
-
env.NEXT_PUBLIC_EDGE_RUNTIME_PROVIDER = env.NEXT_EDGE_RUNTIME_PROVIDER;
|
40389
40388
|
if (target) {
|
40390
40389
|
// Since version v10.0.8-canary.15 of Next.js the NEXT_PRIVATE_TARGET env
|
40391
40390
|
// value can be used to override the target set in next.config.js
|
40392
40391
|
// this helps us catch cases where we can't locate the next.config.js
|
40393
40392
|
// correctly
|
40394
40393
|
env.NEXT_PRIVATE_TARGET = target;
|
40395
|
-
env.NEXT_PUBLIC_TARGET = target;
|
40396
40394
|
}
|
40397
40395
|
// Only NEXT_PUBLIC_ is considered for turbo/nx cache keys
|
40398
40396
|
// and caches may not have the correct trace root so we
|
40399
40397
|
// need to ensure this included in the cache key
|
40400
40398
|
env.NEXT_PRIVATE_OUTPUT_TRACE_ROOT = baseDir;
|
40401
|
-
env.NEXT_PUBLIC_OUTPUT_TRACE_ROOT = baseDir;
|
40402
40399
|
if (isServerMode) {
|
40403
40400
|
// when testing with jest NODE_ENV will be set to test so ensure
|
40404
40401
|
// it is production when running the build command
|
@@ -44967,6 +44964,10 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
44967
44964
|
const rscVaryHeader = routesManifest?.rsc?.varyHeader ||
|
44968
44965
|
'RSC, Next-Router-State-Tree, Next-Router-Prefetch';
|
44969
44966
|
const rscContentTypeHeader = routesManifest?.rsc?.contentTypeHeader || 'text/x-component';
|
44967
|
+
let sourcePath;
|
44968
|
+
if (`/${outputPathPage}` !== srcRoute && srcRoute) {
|
44969
|
+
sourcePath = srcRoute;
|
44970
|
+
}
|
44970
44971
|
prerenders[outputPathPage] = new build_utils_1.Prerender({
|
44971
44972
|
expiration: initialRevalidate,
|
44972
44973
|
lambda,
|
@@ -44976,6 +44977,7 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
44976
44977
|
bypassToken: prerenderManifest.bypassToken,
|
44977
44978
|
initialStatus,
|
44978
44979
|
initialHeaders,
|
44980
|
+
sourcePath,
|
44979
44981
|
...(isNotFound
|
44980
44982
|
? {
|
44981
44983
|
initialStatus: 404,
|
package/dist/utils.js
CHANGED
@@ -1297,6 +1297,10 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1297
1297
|
const rscVaryHeader = routesManifest?.rsc?.varyHeader ||
|
1298
1298
|
'RSC, Next-Router-State-Tree, Next-Router-Prefetch';
|
1299
1299
|
const rscContentTypeHeader = routesManifest?.rsc?.contentTypeHeader || 'text/x-component';
|
1300
|
+
let sourcePath;
|
1301
|
+
if (`/${outputPathPage}` !== srcRoute && srcRoute) {
|
1302
|
+
sourcePath = srcRoute;
|
1303
|
+
}
|
1300
1304
|
prerenders[outputPathPage] = new build_utils_1.Prerender({
|
1301
1305
|
expiration: initialRevalidate,
|
1302
1306
|
lambda,
|
@@ -1306,6 +1310,7 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1306
1310
|
bypassToken: prerenderManifest.bypassToken,
|
1307
1311
|
initialStatus,
|
1308
1312
|
initialHeaders,
|
1313
|
+
sourcePath,
|
1309
1314
|
...(isNotFound
|
1310
1315
|
? {
|
1311
1316
|
initialStatus: 404,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.7.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@types/semver": "6.0.0",
|
46
46
|
"@types/text-table": "0.2.1",
|
47
47
|
"@types/webpack-sources": "3.2.0",
|
48
|
-
"@vercel/build-utils": "6.
|
48
|
+
"@vercel/build-utils": "6.5.0",
|
49
49
|
"@vercel/nft": "0.22.5",
|
50
50
|
"@vercel/routing-utils": "2.1.11",
|
51
51
|
"async-sema": "3.0.1",
|
@@ -71,5 +71,5 @@
|
|
71
71
|
"typescript": "4.5.2",
|
72
72
|
"webpack-sources": "3.2.3"
|
73
73
|
},
|
74
|
-
"gitHead": "
|
74
|
+
"gitHead": "6a7fa1526c6652c24350ef4797664a945775cf52"
|
75
75
|
}
|