@vercel/next 3.0.4-canary.2 → 3.0.4-canary.3

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 CHANGED
@@ -47503,12 +47503,38 @@ 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
  };
47509
47523
  const denormalizeNextDataRoute = (isOverride = false) => {
47510
47524
  return isNextDataServerResolving
47511
47525
  ? [
47526
+ {
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
+ },
47512
47538
  {
47513
47539
  src: path_1.default.join('^/', entryDirectory, '((?!_next/).*)$'),
47514
47540
  has: [
@@ -479,12 +479,38 @@ 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
  };
485
499
  const denormalizeNextDataRoute = (isOverride = false) => {
486
500
  return isNextDataServerResolving
487
501
  ? [
502
+ {
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
+ },
488
514
  {
489
515
  src: path_1.default.join('^/', entryDirectory, '((?!_next/).*)$'),
490
516
  has: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "3.0.4-canary.2",
3
+ "version": "3.0.4-canary.3",
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": "f0d73049caa004b87307fb9038ef30c593ab9108"
73
+ "gitHead": "998f6bf6e65301a19a400886bcc37b2dbbcdabe3"
74
74
  }