@vercel/next 3.0.4-canary.2 → 3.0.5-canary.0
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 +28 -1
- package/dist/server-build.js +28 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -47503,6 +47503,20 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
47503
47503
|
},
|
47504
47504
|
],
|
47505
47505
|
},
|
47506
|
+
// normalize "/index" from "/_next/data/index.json" to -> just "/"
|
47507
|
+
// as matches a rewrite sources will expect just "/"
|
47508
|
+
{
|
47509
|
+
src: path_1.default.join('^/', entryDirectory, '/index'),
|
47510
|
+
has: [
|
47511
|
+
{
|
47512
|
+
type: 'header',
|
47513
|
+
key: 'x-nextjs-data',
|
47514
|
+
},
|
47515
|
+
],
|
47516
|
+
dest: path_1.default.join('/', entryDirectory),
|
47517
|
+
...(isOverride ? { override: true } : {}),
|
47518
|
+
continue: true,
|
47519
|
+
},
|
47506
47520
|
]
|
47507
47521
|
: [];
|
47508
47522
|
};
|
@@ -47510,7 +47524,20 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
47510
47524
|
return isNextDataServerResolving
|
47511
47525
|
? [
|
47512
47526
|
{
|
47513
|
-
src: path_1.default.join('^/', entryDirectory, '
|
47527
|
+
src: path_1.default.join('^/', entryDirectory, '$'),
|
47528
|
+
has: [
|
47529
|
+
{
|
47530
|
+
type: 'header',
|
47531
|
+
key: 'x-nextjs-data',
|
47532
|
+
},
|
47533
|
+
],
|
47534
|
+
dest: `${path_1.default.join('/', entryDirectory, '/_next/data/', buildId, '/index.json')}`,
|
47535
|
+
continue: true,
|
47536
|
+
...(isOverride ? { override: true } : {}),
|
47537
|
+
},
|
47538
|
+
// handle non-trailing slash
|
47539
|
+
{
|
47540
|
+
src: path_1.default.join('^/', entryDirectory, '((?!_next/)(?:.*[^/]|.*))/?$'),
|
47514
47541
|
has: [
|
47515
47542
|
{
|
47516
47543
|
type: 'header',
|
package/dist/server-build.js
CHANGED
@@ -479,6 +479,20 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
479
479
|
},
|
480
480
|
],
|
481
481
|
},
|
482
|
+
// normalize "/index" from "/_next/data/index.json" to -> just "/"
|
483
|
+
// as matches a rewrite sources will expect just "/"
|
484
|
+
{
|
485
|
+
src: path_1.default.join('^/', entryDirectory, '/index'),
|
486
|
+
has: [
|
487
|
+
{
|
488
|
+
type: 'header',
|
489
|
+
key: 'x-nextjs-data',
|
490
|
+
},
|
491
|
+
],
|
492
|
+
dest: path_1.default.join('/', entryDirectory),
|
493
|
+
...(isOverride ? { override: true } : {}),
|
494
|
+
continue: true,
|
495
|
+
},
|
482
496
|
]
|
483
497
|
: [];
|
484
498
|
};
|
@@ -486,7 +500,20 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
486
500
|
return isNextDataServerResolving
|
487
501
|
? [
|
488
502
|
{
|
489
|
-
src: path_1.default.join('^/', entryDirectory, '
|
503
|
+
src: path_1.default.join('^/', entryDirectory, '$'),
|
504
|
+
has: [
|
505
|
+
{
|
506
|
+
type: 'header',
|
507
|
+
key: 'x-nextjs-data',
|
508
|
+
},
|
509
|
+
],
|
510
|
+
dest: `${path_1.default.join('/', entryDirectory, '/_next/data/', buildId, '/index.json')}`,
|
511
|
+
continue: true,
|
512
|
+
...(isOverride ? { override: true } : {}),
|
513
|
+
},
|
514
|
+
// handle non-trailing slash
|
515
|
+
{
|
516
|
+
src: path_1.default.join('^/', entryDirectory, '((?!_next/)(?:.*[^/]|.*))/?$'),
|
490
517
|
has: [
|
491
518
|
{
|
492
519
|
type: 'header',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.5-canary.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -70,5 +70,5 @@
|
|
70
70
|
"typescript": "4.5.2",
|
71
71
|
"webpack-sources": "3.2.3"
|
72
72
|
},
|
73
|
-
"gitHead": "
|
73
|
+
"gitHead": "b8b87b96da49fff38435d1e6ae123a721c8d7a4b"
|
74
74
|
}
|