Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Components HMR Cache #67527

Merged
merged 16 commits into from
Jul 13, 2024
Merged

Server Components HMR Cache #67527

merged 16 commits into from
Jul 13, 2024

Conversation

unstubbable
Copy link
Contributor

@unstubbable unstubbable commented Jul 6, 2024

This adds support for caching fetch responses in server components across HMR refresh requests. The two main benefits are faster responses for those requests, and reduced costs for billed API calls during local development.

Implementation notes:

  • The feature is guarded by the new experimental flag serverComponentsHmrCache.
  • The server components HMR cache is intentionally independent from the incremental cache.
  • Fetched responses are written to the cache after every original fetch call, regardless of the cache settings (specifically including no-store).
  • Cached responses are read from the cache only for HMR refresh requests, potentially also short-cutting the incremental cache.
  • The HMR refresh requests are marked by the client with the newly introduced Next-HMR-Refresh header.
  • I shied away from further extending renderOpts. The alternative of adding another parameter to renderToHTMLOrFlight might not necessarily be better though.
  • This includes a refactoring to steer away from the "fast refresh" wording, since this is a separate (but related) React feature (also build on top of HMR).

x-ref: #48481

@unstubbable unstubbable changed the title Pass fast refresh intent via request headers to request store Fast Refresh Fetch Cache Jul 6, 2024
@ijjk
Copy link
Member

ijjk commented Jul 6, 2024

Tests Passed

@ijjk
Copy link
Member

ijjk commented Jul 6, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
buildDuration 16.6s 15s N/A
buildDurationCached 8.8s 7.4s N/A
nodeModulesSize 365 MB 365 MB ⚠️ +129 kB
nextStartRea..uration (ms) 432ms 433ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
1780.HASH.js gzip 167 B 167 B
5453-HASH.js gzip 37.3 kB 37.4 kB N/A
7514-HASH.js gzip 5.06 kB 5.05 kB N/A
a7a62840-HASH.js gzip 51.7 kB 51.7 kB N/A
framework-HASH.js gzip 56.7 kB 56.7 kB N/A
main-app-HASH.js gzip 222 B 223 B N/A
main-HASH.js gzip 32.2 kB 32.3 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB
Overall change 1.88 kB 1.88 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 192 B 192 B
amp-HASH.js gzip 509 B 510 B N/A
css-HASH.js gzip 341 B 341 B
dynamic-HASH.js gzip 2.52 kB 2.52 kB
edge-ssr-HASH.js gzip 264 B 266 B N/A
head-HASH.js gzip 362 B 363 B N/A
hooks-HASH.js gzip 391 B 390 B N/A
image-HASH.js gzip 4.26 kB 4.26 kB
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.69 kB 2.69 kB N/A
routerDirect..HASH.js gzip 326 B 325 B N/A
script-HASH.js gzip 396 B 397 B N/A
withRouter-HASH.js gzip 320 B 321 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 7.89 kB 7.89 kB
Client Build Manifests
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
_buildManifest.js gzip 485 B 483 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
index.html gzip 520 B 522 B N/A
link.html gzip 537 B 538 B N/A
withRouter.html gzip 519 B 519 B
Overall change 519 B 519 B
Edge SSR bundle Size Overall increase ⚠️
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
edge-ssr.js gzip 127 kB 127 kB ⚠️ +132 B
page.js gzip 167 kB 167 kB ⚠️ +195 B
Overall change 294 kB 294 kB ⚠️ +327 B
Middleware size
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
middleware-b..fest.js gzip 660 B 656 B N/A
middleware-r..fest.js gzip 156 B 155 B N/A
middleware.js gzip 29.7 kB 29.7 kB N/A
edge-runtime..pack.js gzip 1.03 kB 1.03 kB
Overall change 1.03 kB 1.03 kB
Next Runtimes Overall increase ⚠️
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
550-experime...dev.js gzip 309 B 309 B
550.runtime.dev.js gzip 301 B 301 B
app-page-exp...dev.js gzip 232 kB 232 kB ⚠️ +149 B
app-page-exp..prod.js gzip 118 kB 118 kB ⚠️ +143 B
app-page-tur..prod.js gzip 130 kB 130 kB ⚠️ +147 B
app-page-tur..prod.js gzip 126 kB 126 kB ⚠️ +149 B
app-page.run...dev.js gzip 226 kB 227 kB ⚠️ +157 B
app-page.run..prod.js gzip 114 kB 114 kB ⚠️ +152 B
app-route-ex...dev.js gzip 23.3 kB 23.4 kB ⚠️ +106 B
app-route-ex..prod.js gzip 18.7 kB 18.8 kB ⚠️ +112 B
app-route-tu..prod.js gzip 18.7 kB 18.9 kB ⚠️ +112 B
app-route-tu..prod.js gzip 18.6 kB 18.7 kB ⚠️ +105 B
app-route.ru...dev.js gzip 24.6 kB 24.7 kB ⚠️ +112 B
app-route.ru..prod.js gzip 18.6 kB 18.7 kB ⚠️ +105 B
pages-api-tu..prod.js gzip 9.6 kB 9.6 kB
pages-api.ru...dev.js gzip 9.87 kB 9.87 kB
pages-api.ru..prod.js gzip 9.59 kB 9.59 kB
pages-turbo...prod.js gzip 21.6 kB 21.6 kB
pages.runtim...dev.js gzip 22.1 kB 22.1 kB
pages.runtim..prod.js gzip 21.6 kB 21.6 kB
server.runti..prod.js gzip 56.6 kB 56.7 kB N/A
Overall change 1.16 MB 1.16 MB ⚠️ +1.55 kB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js fast-refresh-fetch-cache Change
0.pack gzip 1.42 MB 1.43 MB ⚠️ +10 kB
index.pack gzip 120 kB 121 kB ⚠️ +1.02 kB
Overall change 1.54 MB 1.55 MB ⚠️ +11 kB
Diff details
Diff for page.js

Diff too large to display

Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [8358],
   {
-    /***/ 1362: /***/ (
+    /***/ 9618: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(2160);
+          return __webpack_require__(699);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 537: /***/ (module, exports, __webpack_require__) => {
+    /***/ 9451: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,15 +40,15 @@
         __webpack_require__(3537)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(7092)
+        __webpack_require__(6490)
       );
-      const _getimgprops = __webpack_require__(9834);
-      const _imageconfig = __webpack_require__(5676);
-      const _imageconfigcontextsharedruntime = __webpack_require__(387);
-      const _warnonce = __webpack_require__(451);
-      const _routercontextsharedruntime = __webpack_require__(5357);
+      const _getimgprops = __webpack_require__(3646);
+      const _imageconfig = __webpack_require__(535);
+      const _imageconfigcontextsharedruntime = __webpack_require__(4724);
+      const _warnonce = __webpack_require__(6321);
+      const _routercontextsharedruntime = __webpack_require__(1759);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3945)
+        __webpack_require__(1882)
       );
       // This is replaced by webpack define plugin
       const configEnv = {
@@ -376,7 +376,7 @@
       /***/
     },
 
-    /***/ 9834: /***/ (
+    /***/ 3646: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -392,9 +392,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(451);
-      const _imageblursvg = __webpack_require__(3547);
-      const _imageconfig = __webpack_require__(5676);
+      const _warnonce = __webpack_require__(6321);
+      const _imageblursvg = __webpack_require__(8297);
+      const _imageconfig = __webpack_require__(535);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -766,7 +766,7 @@
       /***/
     },
 
-    /***/ 3547: /***/ (__unused_webpack_module, exports) => {
+    /***/ 8297: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -821,7 +821,7 @@
       /***/
     },
 
-    /***/ 6850: /***/ (
+    /***/ 973: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -848,10 +848,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(1478);
-      const _getimgprops = __webpack_require__(9834);
-      const _imagecomponent = __webpack_require__(537);
+      const _getimgprops = __webpack_require__(3646);
+      const _imagecomponent = __webpack_require__(9451);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3945)
+        __webpack_require__(1882)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -883,7 +883,7 @@
       /***/
     },
 
-    /***/ 3945: /***/ (__unused_webpack_module, exports) => {
+    /***/ 1882: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -918,7 +918,7 @@
       /***/
     },
 
-    /***/ 2160: /***/ (
+    /***/ 699: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -935,8 +935,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/react@19.0.0-rc-6230622a1a-20240610/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(898);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__zehaskxadtwcczqqbmt6koh6bq/node_modules/next/image.js
-      var next_image = __webpack_require__(6793);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610__uulzbengwsfwhwaa2ambxampcy/node_modules/next/image.js
+      var next_image = __webpack_require__(1428);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -966,12 +966,12 @@
       /***/
     },
 
-    /***/ 6793: /***/ (
+    /***/ 1428: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(6850);
+      module.exports = __webpack_require__(973);
 
       /***/
     },
@@ -981,7 +981,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(1362)
+      __webpack_exec__(9618)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for link-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [4644],
   {
-    /***/ 4347: /***/ (
+    /***/ 6799: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/link",
         function () {
-          return __webpack_require__(6218);
+          return __webpack_require__(3764);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 3474: /***/ (module, exports) => {
+    /***/ 1717: /***/ (module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -33,8 +33,8 @@
           });
       }
       _export(exports, {
-        ACTION_FAST_REFRESH: function () {
-          return ACTION_FAST_REFRESH;
+        ACTION_HMR_REFRESH: function () {
+          return ACTION_HMR_REFRESH;
         },
         ACTION_NAVIGATE: function () {
           return ACTION_NAVIGATE;
@@ -69,7 +69,7 @@
       const ACTION_RESTORE = "restore";
       const ACTION_SERVER_PATCH = "server-patch";
       const ACTION_PREFETCH = "prefetch";
-      const ACTION_FAST_REFRESH = "fast-refresh";
+      const ACTION_HMR_REFRESH = "hmr-refresh";
       const ACTION_SERVER_ACTION = "server-action";
       var PrefetchKind;
       (function (PrefetchKind) {
@@ -110,7 +110,7 @@
       /***/
     },
 
-    /***/ 1604: /***/ (module, exports, __webpack_require__) => {
+    /***/ 2156: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -122,7 +122,7 @@
           return getDomainLocale;
         },
       });
-      const _normalizetrailingslash = __webpack_require__(2003);
+      const _normalizetrailingslash = __webpack_require__(4030);
       const basePath =
         /* unused pure expression or super */ null && (false || "");
       function getDomainLocale(path, locale, locales, domainLocales) {
@@ -146,7 +146,7 @@
       /***/
     },
 
-    /***/ 6311: /***/ (module, exports, __webpack_require__) => {
+    /***/ 9649: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -163,17 +163,17 @@
       const _react = /*#__PURE__*/ _interop_require_default._(
         __webpack_require__(2516)
       );
-      const _resolvehref = __webpack_require__(692);
-      const _islocalurl = __webpack_require__(7635);
-      const _formaturl = __webpack_require__(8281);
-      const _utils = __webpack_require__(5164);
-      const _addlocale = __webpack_require__(5243);
-      const _routercontextsharedruntime = __webpack_require__(5357);
-      const _approutercontextsharedruntime = __webpack_require__(2666);
-      const _useintersection = __webpack_require__(791);
-      const _getdomainlocale = __webpack_require__(1604);
-      const _addbasepath = __webpack_require__(3390);
-      const _routerreducertypes = __webpack_require__(3474);
+      const _resolvehref = __webpack_require__(979);
+      const _islocalurl = __webpack_require__(8591);
+      const _formaturl = __webpack_require__(3594);
+      const _utils = __webpack_require__(4537);
+      const _addlocale = __webpack_require__(380);
+      const _routercontextsharedruntime = __webpack_require__(1759);
+      const _approutercontextsharedruntime = __webpack_require__(9123);
+      const _useintersection = __webpack_require__(2859);
+      const _getdomainlocale = __webpack_require__(2156);
+      const _addbasepath = __webpack_require__(8848);
+      const _routerreducertypes = __webpack_require__(1717);
       const prefetched = new Set();
       function prefetch(router, href, as, options, appOptions, isAppRouter) {
         if (false) {
@@ -600,7 +600,7 @@
       /***/
     },
 
-    /***/ 791: /***/ (module, exports, __webpack_require__) => {
+    /***/ 2859: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -613,7 +613,7 @@
         },
       });
       const _react = __webpack_require__(2516);
-      const _requestidlecallback = __webpack_require__(7861);
+      const _requestidlecallback = __webpack_require__(3397);
       const hasIntersectionObserver =
         typeof IntersectionObserver === "function";
       const observers = new Map();
@@ -726,7 +726,7 @@
       /***/
     },
 
-    /***/ 6218: /***/ (
+    /***/ 3764: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -741,7 +741,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(898);
       /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(7353);
+        __webpack_require__(5034);
       /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_link__WEBPACK_IMPORTED_MODULE_1__
@@ -772,12 +772,12 @@
       /***/
     },
 
-    /***/ 7353: /***/ (
+    /***/ 5034: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(6311);
+      module.exports = __webpack_require__(9649);
 
       /***/
     },
@@ -787,7 +787,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(4347)
+      __webpack_exec__(6799)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 5453-HASH.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-exp..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page.runtime.dev.js
failed to diff
Diff for app-page.runtime.prod.js

Diff too large to display

Diff for app-route-ex..ntime.dev.js

Diff too large to display

Diff for app-route-ex..time.prod.js

Diff too large to display

Diff for app-route-tu..time.prod.js

Diff too large to display

Diff for app-route-tu..time.prod.js

Diff too large to display

Diff for app-route.runtime.dev.js

Diff too large to display

Diff for app-route.ru..time.prod.js

Diff too large to display

Diff for pages-turbo...time.prod.js
@@ -22,7 +22,7 @@ Read more: https://nextjs.org/docs/messages/${r}`};function e0(e,t,r){let{destin
 `+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e1(n,s,a,i,l,d){var u,c,p;let h,f,m,g;(0,x.gk)({req:n},"cookies",(c=n.headers,function(){let{cookie:e}=c;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let v={};if(v.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!v.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(v.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(v.assetQueryString+=`${v.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:b,dev:w=!1,ampPath:S="",pageConfig:j={},buildManifest:E,reactLoadableManifest:T,ErrorDebug:$,getStaticProps:I,getStaticPaths:k,getServerSideProps:M,isNextDataRequest:D,params:F,previewProps:q,basePath:W,images:Y,runtime:K,isExperimentalCompile:et,swrDelta:es}=l,{App:ea}=d,ei=v.assetQueryString,el=d.Document,ec=l.Component,ep=!!i.__nextFallback,eh=i.__nextNotFoundSrcPage;!function(e){for(let t of eL)delete e[t]}(i);let ef=!!I,em=ef&&l.nextExport,eg=ea.getInitialProps===ea.origGetInitialProps,ev=!!(null==ec?void 0:ec.getInitialProps),ey=null==ec?void 0:ec.unstable_scriptLoader,ex=J(a),eb="/_error"===a&&ec.getInitialProps===ec.origGetInitialProps;l.nextExport&&ev&&!eb&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
 Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let ew=!ev&&eg&&!ef&&!M;if(ew&&!w&&et&&(s.setHeader("Cache-Control",function({revalidate:e,swrDelta:t}){let r=t?`stale-while-revalidate=${t}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${C.BR}, ${r}`}({revalidate:!1,swrDelta:es})),ew=!1),ev&&ef)throw Error(C.wh+` ${a}`);if(ev&&M)throw Error(C.Wo+` ${a}`);if(M&&ef)throw Error(C.oL+` ${a}`);if(M&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(k&&!ex)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
 Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`);if(k&&!ef)throw Error(`getStaticPaths was added without a getStaticProps in ${a}. Without getStaticProps, getStaticPaths does nothing`);if(ef&&ex&&!k)throw Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${a}'.
-Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let eS=l.resolvedAsPath||n.url;if(w){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(ec))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(ea))throw Error('The default export is not a React Component in page: "/_app"');if(!e(el))throw Error('The default export is not a React Component in page: "/_document"');if((ew||ep)&&(i={...i.amp?{amp:i.amp}:{}},eS=`${a}${n.url.endsWith("/")&&"/"!==a&&!ex?"/":""}`,n.url=a),"/404"===a&&(ev||M))throw Error(`\`pages/404\` ${C.Ei}`);if(R.Er.includes(a)&&(ev||M))throw Error(`\`pages${a}\` ${C.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==ec?void 0:ec[e])throw Error(`page ${a} ${e} ${C.lk}`);await B.preloadAll(),(ef||M)&&!ep&&q&&(m=!1!==(h=e(n,s,q)));let eP=new eZ(a,i,eS,{isFallback:ep},!!(M||ev||!eg&&!ef||et),W,l.locale,l.locales,l.defaultLocale,l.domainLocales,m,ee(n,"isLocaleDomain")),e_={back(){eP.back()},forward(){eP.forward()},refresh(){eP.reload()},fastRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eP.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eP.replace(e,void 0,{scroll:r})},prefetch(e){eP.prefetch(e)}},eC={},eR=(0,_.createStyleRegistry)(),ej={ampFirst:!0===j.amp,hasQuery:!!i.amp,hybrid:"hybrid"===j.amp},e$=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(ej),eO=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(e$),ek=[],eM={};ey&&(eM.beforeInteractive=[].concat(ey()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let ez=({children:e})=>(0,y.jsx)(eH.Provider,{value:e_,children:(0,y.jsx)(eA.Provider,{value:eP.isReady&&eP.query?new URL(eP.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eB,{router:eP,isAutoExport:ew,children:(0,y.jsx)(eI.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=eu(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=U.find(t=>e.startsWith(t)),o=e.match(eF);if(t&&o){let{key:e,optional:s,repeat:a}=eq(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eD(t)+"([^/]+?)"}if(!o)return"/"+eD(e);{let{key:e,repeat:t,optional:s}=eq(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eP),children:(0,y.jsx)(H.Provider,{value:eP,children:(0,y.jsx)(L.Provider,{value:ej,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eO=e},updateScripts:e=>{eC=e},scripts:eM,mountedInstances:new Set},children:(0,y.jsx)(O.Provider,{value:e=>ek.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:eR,children:(0,y.jsx)(eT.Provider,{value:Y,children:e})})})})})})})})})}),eU=()=>null,eW=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eU,{}),(0,y.jsx)(ez,{children:(0,y.jsxs)(y.Fragment,{children:[w?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eU,{})]}):e,(0,y.jsx)(eU,{})]})})]}),eJ={err:b,req:ew?void 0:n,res:ew?void 0:s,pathname:a,query:i,asPath:eS,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eW,{children:eY(ea,ec,{...e,router:eP})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=eR.styles({nonce:t.nonce});return eR.flush(),{html:r,head:n,styles:o}}},eX=!ef&&(l.nextExport||w&&(ew||ep)),e1=()=>{let e=eR.styles();return eR.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(f=await X(ea,{AppTree:eJ.AppTree,Component:ec,router:eP,ctx:eJ}),(ef||M)&&m&&(f.__N_PREVIEW=!0),ef&&(f[R.NO]=!0),ef&&!ep){let e,t;try{e=await (0,en.getTracer)().trace(eo.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>I({...ex?{params:i}:void 0,...m?{draftMode:!0,preview:!0,previewData:h}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":em?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(C.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(C.Eo);if(r.length)throw Error(eK("getStaticProps",r));if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');v.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e0(e.redirect,n,"getStaticProps"),em)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
+Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let eS=l.resolvedAsPath||n.url;if(w){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(ec))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(ea))throw Error('The default export is not a React Component in page: "/_app"');if(!e(el))throw Error('The default export is not a React Component in page: "/_document"');if((ew||ep)&&(i={...i.amp?{amp:i.amp}:{}},eS=`${a}${n.url.endsWith("/")&&"/"!==a&&!ex?"/":""}`,n.url=a),"/404"===a&&(ev||M))throw Error(`\`pages/404\` ${C.Ei}`);if(R.Er.includes(a)&&(ev||M))throw Error(`\`pages${a}\` ${C.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==ec?void 0:ec[e])throw Error(`page ${a} ${e} ${C.lk}`);await B.preloadAll(),(ef||M)&&!ep&&q&&(m=!1!==(h=e(n,s,q)));let eP=new eZ(a,i,eS,{isFallback:ep},!!(M||ev||!eg&&!ef||et),W,l.locale,l.locales,l.defaultLocale,l.domainLocales,m,ee(n,"isLocaleDomain")),e_={back(){eP.back()},forward(){eP.forward()},refresh(){eP.reload()},hmrRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eP.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eP.replace(e,void 0,{scroll:r})},prefetch(e){eP.prefetch(e)}},eC={},eR=(0,_.createStyleRegistry)(),ej={ampFirst:!0===j.amp,hasQuery:!!i.amp,hybrid:"hybrid"===j.amp},e$=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(ej),eO=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(e$),ek=[],eM={};ey&&(eM.beforeInteractive=[].concat(ey()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let ez=({children:e})=>(0,y.jsx)(eH.Provider,{value:e_,children:(0,y.jsx)(eA.Provider,{value:eP.isReady&&eP.query?new URL(eP.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eB,{router:eP,isAutoExport:ew,children:(0,y.jsx)(eI.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=eu(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=U.find(t=>e.startsWith(t)),o=e.match(eF);if(t&&o){let{key:e,optional:s,repeat:a}=eq(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eD(t)+"([^/]+?)"}if(!o)return"/"+eD(e);{let{key:e,repeat:t,optional:s}=eq(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eP),children:(0,y.jsx)(H.Provider,{value:eP,children:(0,y.jsx)(L.Provider,{value:ej,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eO=e},updateScripts:e=>{eC=e},scripts:eM,mountedInstances:new Set},children:(0,y.jsx)(O.Provider,{value:e=>ek.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:eR,children:(0,y.jsx)(eT.Provider,{value:Y,children:e})})})})})})})})})}),eU=()=>null,eW=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eU,{}),(0,y.jsx)(ez,{children:(0,y.jsxs)(y.Fragment,{children:[w?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eU,{})]}):e,(0,y.jsx)(eU,{})]})})]}),eJ={err:b,req:ew?void 0:n,res:ew?void 0:s,pathname:a,query:i,asPath:eS,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eW,{children:eY(ea,ec,{...e,router:eP})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=eR.styles({nonce:t.nonce});return eR.flush(),{html:r,head:n,styles:o}}},eX=!ef&&(l.nextExport||w&&(ew||ep)),e1=()=>{let e=eR.styles();return eR.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(f=await X(ea,{AppTree:eJ.AppTree,Component:ec,router:eP,ctx:eJ}),(ef||M)&&m&&(f.__N_PREVIEW=!0),ef&&(f[R.NO]=!0),ef&&!ep){let e,t;try{e=await (0,en.getTracer)().trace(eo.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>I({...ex?{params:i}:void 0,...m?{draftMode:!0,preview:!0,previewData:h}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":em?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(C.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(C.Eo);if(r.length)throw Error(eK("getStaticProps",r));if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');v.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e0(e.redirect,n,"getStaticProps"),em)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
 See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`);e.props={__N_REDIRECT:e.redirect.destination,__N_REDIRECT_STATUS:er(e.redirect)},void 0!==e.redirect.basePath&&(e.props.__N_REDIRECT_BASE_PATH=e.redirect.basePath),v.isRedirect=!0}if((w||em)&&!v.isNotFound&&!N(a,"getStaticProps",e.props))throw Error("invariant: getStaticProps did not return valid props. Please report this.");if("revalidate"in e){if(e.revalidate&&"export"===l.nextConfigOutput)throw Error('ISR cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if("number"==typeof e.revalidate){if(Number.isInteger(e.revalidate)){if(e.revalidate<=0)throw Error(`A page's revalidate option can not be less than or equal to zero for ${n.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.
 
 To never revalidate, you can set revalidate to \`false\` (only ran once at build-time).
Diff for pages.runtime.dev.js
@@ -14,7 +14,7 @@ Read more: https://nextjs.org/docs/messages/${r}`};function e1(e,t,r){let{destin
 `+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e4(n,s,a,i,l,d){var u,c,p;let h,m,f,g;(0,x.gk)({req:n},"cookies",(c=n.headers,function(){let{cookie:e}=c;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let v={};if(v.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!v.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(v.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(v.assetQueryString+=`${v.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:b,dev:w=!1,ampPath:S="",pageConfig:R={},buildManifest:E,reactLoadableManifest:T,ErrorDebug:N,getStaticProps:I,getStaticPaths:k,getServerSideProps:M,isNextDataRequest:D,params:F,previewProps:q,basePath:W,images:Y,runtime:K,isExperimentalCompile:et,swrDelta:es}=l,{App:ea}=d,ei=v.assetQueryString,el=d.Document,ec=l.Component,ep=!!i.__nextFallback,eh=i.__nextNotFoundSrcPage;!function(e){for(let t of eL)delete e[t]}(i);let em=!!I,ef=em&&l.nextExport,eg=ea.getInitialProps===ea.origGetInitialProps,ev=!!(null==ec?void 0:ec.getInitialProps),ey=null==ec?void 0:ec.unstable_scriptLoader,ex=G(a),eb="/_error"===a&&ec.getInitialProps===ec.origGetInitialProps;l.nextExport&&ev&&!eb&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
 Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let ew=!ev&&eg&&!em&&!M;if(ew&&!w&&et&&(s.setHeader("Cache-Control",function({revalidate:e,swrDelta:t}){let r=t?`stale-while-revalidate=${t}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${C.BR}, ${r}`}({revalidate:!1,swrDelta:es})),ew=!1),ev&&em)throw Error(C.wh+` ${a}`);if(ev&&M)throw Error(C.Wo+` ${a}`);if(M&&em)throw Error(C.oL+` ${a}`);if(M&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(k&&!ex)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
 Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`);if(k&&!em)throw Error(`getStaticPaths was added without a getStaticProps in ${a}. Without getStaticProps, getStaticPaths does nothing`);if(em&&ex&&!k)throw Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${a}'.
-Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let eS=l.resolvedAsPath||n.url;if(w){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(ec))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(ea))throw Error('The default export is not a React Component in page: "/_app"');if(!e(el))throw Error('The default export is not a React Component in page: "/_document"');if((ew||ep)&&(i={...i.amp?{amp:i.amp}:{}},eS=`${a}${n.url.endsWith("/")&&"/"!==a&&!ex?"/":""}`,n.url=a),"/404"===a&&(ev||M))throw Error(`\`pages/404\` ${C.Ei}`);if(j.Er.includes(a)&&(ev||M))throw Error(`\`pages${a}\` ${C.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==ec?void 0:ec[e])throw Error(`page ${a} ${e} ${C.lk}`);await H.preloadAll(),(em||M)&&!ep&&q&&(f=!1!==(h=e(n,s,q)));let eP=new eY(a,i,eS,{isFallback:ep},!!(M||ev||!eg&&!em||et),W,l.locale,l.locales,l.defaultLocale,l.domainLocales,f,ee(n,"isLocaleDomain")),e_={back(){eP.back()},forward(){eP.forward()},refresh(){eP.reload()},fastRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eP.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eP.replace(e,void 0,{scroll:r})},prefetch(e){eP.prefetch(e)}},eC={},ej=(0,_.createStyleRegistry)(),eR={ampFirst:!0===R.amp,hasQuery:!!i.amp,hybrid:"hybrid"===R.amp},eN=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(eR),eO=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(eN),ek=[],eM={};ey&&(eM.beforeInteractive=[].concat(ey()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let ez=({children:e})=>(0,y.jsx)(eB.Provider,{value:e_,children:(0,y.jsx)(eA.Provider,{value:eP.isReady&&eP.query?new URL(eP.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eH,{router:eP,isAutoExport:ew,children:(0,y.jsx)(eI.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=eu(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=U.find(t=>e.startsWith(t)),o=e.match(eF);if(t&&o){let{key:e,optional:s,repeat:a}=eq(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eD(t)+"([^/]+?)"}if(!o)return"/"+eD(e);{let{key:e,repeat:t,optional:s}=eq(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eP),children:(0,y.jsx)(B.Provider,{value:eP,children:(0,y.jsx)(L.Provider,{value:eR,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eO=e},updateScripts:e=>{eC=e},scripts:eM,mountedInstances:new Set},children:(0,y.jsx)(O.Provider,{value:e=>ek.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:ej,children:(0,y.jsx)(eT.Provider,{value:Y,children:e})})})})})})})})})}),eU=()=>null,eW=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eU,{}),(0,y.jsx)(ez,{children:(0,y.jsxs)(y.Fragment,{children:[w?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eU,{})]}):e,(0,y.jsx)(eU,{})]})})]}),eG={err:b,req:ew?void 0:n,res:ew?void 0:s,pathname:a,query:i,asPath:eS,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eW,{children:eK(ea,ec,{...e,router:eP})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=ej.styles({nonce:t.nonce});return ej.flush(),{html:r,head:n,styles:o}}},eQ=!em&&(l.nextExport||w&&(ew||ep)),e4=()=>{let e=ej.styles();return ej.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(m=await X(ea,{AppTree:eG.AppTree,Component:ec,router:eP,ctx:eG}),(em||M)&&f&&(m.__N_PREVIEW=!0),em&&(m[j.NO]=!0),em&&!ep){let e,t;try{e=await (0,en.getTracer)().trace(eo.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>I({...ex?{params:i}:void 0,...f?{draftMode:!0,preview:!0,previewData:h}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":ef?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(C.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(C.Eo);if(r.length)throw Error(e0("getStaticProps",r));if(void 0!==e.notFound&&void 0!==e.redirect)throw Error(`\`redirect\` and \`notFound\` can not both be returned from ${em?"getStaticProps":"getServerSideProps"} at the same time. Page: ${a}
+Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let eS=l.resolvedAsPath||n.url;if(w){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(ec))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(ea))throw Error('The default export is not a React Component in page: "/_app"');if(!e(el))throw Error('The default export is not a React Component in page: "/_document"');if((ew||ep)&&(i={...i.amp?{amp:i.amp}:{}},eS=`${a}${n.url.endsWith("/")&&"/"!==a&&!ex?"/":""}`,n.url=a),"/404"===a&&(ev||M))throw Error(`\`pages/404\` ${C.Ei}`);if(j.Er.includes(a)&&(ev||M))throw Error(`\`pages${a}\` ${C.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==ec?void 0:ec[e])throw Error(`page ${a} ${e} ${C.lk}`);await H.preloadAll(),(em||M)&&!ep&&q&&(f=!1!==(h=e(n,s,q)));let eP=new eY(a,i,eS,{isFallback:ep},!!(M||ev||!eg&&!em||et),W,l.locale,l.locales,l.defaultLocale,l.domainLocales,f,ee(n,"isLocaleDomain")),e_={back(){eP.back()},forward(){eP.forward()},refresh(){eP.reload()},hmrRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eP.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eP.replace(e,void 0,{scroll:r})},prefetch(e){eP.prefetch(e)}},eC={},ej=(0,_.createStyleRegistry)(),eR={ampFirst:!0===R.amp,hasQuery:!!i.amp,hybrid:"hybrid"===R.amp},eN=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(eR),eO=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(eN),ek=[],eM={};ey&&(eM.beforeInteractive=[].concat(ey()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let ez=({children:e})=>(0,y.jsx)(eB.Provider,{value:e_,children:(0,y.jsx)(eA.Provider,{value:eP.isReady&&eP.query?new URL(eP.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eH,{router:eP,isAutoExport:ew,children:(0,y.jsx)(eI.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=eu(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=U.find(t=>e.startsWith(t)),o=e.match(eF);if(t&&o){let{key:e,optional:s,repeat:a}=eq(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eD(t)+"([^/]+?)"}if(!o)return"/"+eD(e);{let{key:e,repeat:t,optional:s}=eq(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eP),children:(0,y.jsx)(B.Provider,{value:eP,children:(0,y.jsx)(L.Provider,{value:eR,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eO=e},updateScripts:e=>{eC=e},scripts:eM,mountedInstances:new Set},children:(0,y.jsx)(O.Provider,{value:e=>ek.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:ej,children:(0,y.jsx)(eT.Provider,{value:Y,children:e})})})})})})})})})}),eU=()=>null,eW=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eU,{}),(0,y.jsx)(ez,{children:(0,y.jsxs)(y.Fragment,{children:[w?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eU,{})]}):e,(0,y.jsx)(eU,{})]})})]}),eG={err:b,req:ew?void 0:n,res:ew?void 0:s,pathname:a,query:i,asPath:eS,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eW,{children:eK(ea,ec,{...e,router:eP})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=ej.styles({nonce:t.nonce});return ej.flush(),{html:r,head:n,styles:o}}},eQ=!em&&(l.nextExport||w&&(ew||ep)),e4=()=>{let e=ej.styles();return ej.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(m=await X(ea,{AppTree:eG.AppTree,Component:ec,router:eP,ctx:eG}),(em||M)&&f&&(m.__N_PREVIEW=!0),em&&(m[j.NO]=!0),em&&!ep){let e,t;try{e=await (0,en.getTracer)().trace(eo.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>I({...ex?{params:i}:void 0,...f?{draftMode:!0,preview:!0,previewData:h}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":ef?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(C.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(C.Eo);if(r.length)throw Error(e0("getStaticProps",r));if(void 0!==e.notFound&&void 0!==e.redirect)throw Error(`\`redirect\` and \`notFound\` can not both be returned from ${em?"getStaticProps":"getServerSideProps"} at the same time. Page: ${a}
 See more info here: https://nextjs.org/docs/messages/gssp-mixed-not-found-redirect`);if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');v.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e1(e.redirect,n,"getStaticProps"),ef)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
 See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`);e.props={__N_REDIRECT:e.redirect.destination,__N_REDIRECT_STATUS:er(e.redirect)},void 0!==e.redirect.basePath&&(e.props.__N_REDIRECT_BASE_PATH=e.redirect.basePath),v.isRedirect=!0}if((w||ef)&&!v.isNotFound&&!$(a,"getStaticProps",e.props))throw Error("invariant: getStaticProps did not return valid props. Please report this.");if("revalidate"in e){if(e.revalidate&&"export"===l.nextConfigOutput)throw Error('ISR cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if("number"==typeof e.revalidate){if(Number.isInteger(e.revalidate)){if(e.revalidate<=0)throw Error(`A page's revalidate option can not be less than or equal to zero for ${n.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.
Diff for pages.runtime.prod.js
@@ -22,7 +22,7 @@ Read more: https://nextjs.org/docs/messages/${r}`};function e0(e,t,r){let{destin
 `+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e1(n,s,a,i,l,d){var u,c,p;let h,f,m,g;(0,x.gk)({req:n},"cookies",(c=n.headers,function(){let{cookie:e}=c;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let v={};if(v.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!v.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(v.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(v.assetQueryString+=`${v.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:b,dev:w=!1,ampPath:S="",pageConfig:j={},buildManifest:E,reactLoadableManifest:T,ErrorDebug:$,getStaticProps:I,getStaticPaths:k,getServerSideProps:M,isNextDataRequest:D,params:F,previewProps:q,basePath:W,images:Y,runtime:K,isExperimentalCompile:et,swrDelta:es}=l,{App:ea}=d,ei=v.assetQueryString,el=d.Document,ec=l.Component,ep=!!i.__nextFallback,eh=i.__nextNotFoundSrcPage;!function(e){for(let t of eL)delete e[t]}(i);let ef=!!I,em=ef&&l.nextExport,eg=ea.getInitialProps===ea.origGetInitialProps,ev=!!(null==ec?void 0:ec.getInitialProps),ey=null==ec?void 0:ec.unstable_scriptLoader,ex=J(a),eb="/_error"===a&&ec.getInitialProps===ec.origGetInitialProps;l.nextExport&&ev&&!eb&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
 Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let ew=!ev&&eg&&!ef&&!M;if(ew&&!w&&et&&(s.setHeader("Cache-Control",function({revalidate:e,swrDelta:t}){let r=t?`stale-while-revalidate=${t}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${C.BR}, ${r}`}({revalidate:!1,swrDelta:es})),ew=!1),ev&&ef)throw Error(C.wh+` ${a}`);if(ev&&M)throw Error(C.Wo+` ${a}`);if(M&&ef)throw Error(C.oL+` ${a}`);if(M&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(k&&!ex)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
 Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`);if(k&&!ef)throw Error(`getStaticPaths was added without a getStaticProps in ${a}. Without getStaticProps, getStaticPaths does nothing`);if(ef&&ex&&!k)throw Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${a}'.
-Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let eS=l.resolvedAsPath||n.url;if(w){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(ec))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(ea))throw Error('The default export is not a React Component in page: "/_app"');if(!e(el))throw Error('The default export is not a React Component in page: "/_document"');if((ew||ep)&&(i={...i.amp?{amp:i.amp}:{}},eS=`${a}${n.url.endsWith("/")&&"/"!==a&&!ex?"/":""}`,n.url=a),"/404"===a&&(ev||M))throw Error(`\`pages/404\` ${C.Ei}`);if(R.Er.includes(a)&&(ev||M))throw Error(`\`pages${a}\` ${C.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==ec?void 0:ec[e])throw Error(`page ${a} ${e} ${C.lk}`);await B.preloadAll(),(ef||M)&&!ep&&q&&(m=!1!==(h=e(n,s,q)));let eP=new eZ(a,i,eS,{isFallback:ep},!!(M||ev||!eg&&!ef||et),W,l.locale,l.locales,l.defaultLocale,l.domainLocales,m,ee(n,"isLocaleDomain")),e_={back(){eP.back()},forward(){eP.forward()},refresh(){eP.reload()},fastRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eP.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eP.replace(e,void 0,{scroll:r})},prefetch(e){eP.prefetch(e)}},eC={},eR=(0,_.createStyleRegistry)(),ej={ampFirst:!0===j.amp,hasQuery:!!i.amp,hybrid:"hybrid"===j.amp},e$=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(ej),eO=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(e$),ek=[],eM={};ey&&(eM.beforeInteractive=[].concat(ey()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let ez=({children:e})=>(0,y.jsx)(eH.Provider,{value:e_,children:(0,y.jsx)(eA.Provider,{value:eP.isReady&&eP.query?new URL(eP.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eB,{router:eP,isAutoExport:ew,children:(0,y.jsx)(eI.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=eu(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=U.find(t=>e.startsWith(t)),o=e.match(eF);if(t&&o){let{key:e,optional:s,repeat:a}=eq(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eD(t)+"([^/]+?)"}if(!o)return"/"+eD(e);{let{key:e,repeat:t,optional:s}=eq(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eP),children:(0,y.jsx)(H.Provider,{value:eP,children:(0,y.jsx)(L.Provider,{value:ej,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eO=e},updateScripts:e=>{eC=e},scripts:eM,mountedInstances:new Set},children:(0,y.jsx)(O.Provider,{value:e=>ek.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:eR,children:(0,y.jsx)(eT.Provider,{value:Y,children:e})})})})})})})})})}),eU=()=>null,eW=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eU,{}),(0,y.jsx)(ez,{children:(0,y.jsxs)(y.Fragment,{children:[w?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eU,{})]}):e,(0,y.jsx)(eU,{})]})})]}),eJ={err:b,req:ew?void 0:n,res:ew?void 0:s,pathname:a,query:i,asPath:eS,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eW,{children:eY(ea,ec,{...e,router:eP})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=eR.styles({nonce:t.nonce});return eR.flush(),{html:r,head:n,styles:o}}},eX=!ef&&(l.nextExport||w&&(ew||ep)),e1=()=>{let e=eR.styles();return eR.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(f=await X(ea,{AppTree:eJ.AppTree,Component:ec,router:eP,ctx:eJ}),(ef||M)&&m&&(f.__N_PREVIEW=!0),ef&&(f[R.NO]=!0),ef&&!ep){let e,t;try{e=await (0,en.getTracer)().trace(eo.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>I({...ex?{params:i}:void 0,...m?{draftMode:!0,preview:!0,previewData:h}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":em?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(C.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(C.Eo);if(r.length)throw Error(eK("getStaticProps",r));if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');v.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e0(e.redirect,n,"getStaticProps"),em)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
+Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let eS=l.resolvedAsPath||n.url;if(w){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(ec))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(ea))throw Error('The default export is not a React Component in page: "/_app"');if(!e(el))throw Error('The default export is not a React Component in page: "/_document"');if((ew||ep)&&(i={...i.amp?{amp:i.amp}:{}},eS=`${a}${n.url.endsWith("/")&&"/"!==a&&!ex?"/":""}`,n.url=a),"/404"===a&&(ev||M))throw Error(`\`pages/404\` ${C.Ei}`);if(R.Er.includes(a)&&(ev||M))throw Error(`\`pages${a}\` ${C.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==ec?void 0:ec[e])throw Error(`page ${a} ${e} ${C.lk}`);await B.preloadAll(),(ef||M)&&!ep&&q&&(m=!1!==(h=e(n,s,q)));let eP=new eZ(a,i,eS,{isFallback:ep},!!(M||ev||!eg&&!ef||et),W,l.locale,l.locales,l.defaultLocale,l.domainLocales,m,ee(n,"isLocaleDomain")),e_={back(){eP.back()},forward(){eP.forward()},refresh(){eP.reload()},hmrRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eP.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eP.replace(e,void 0,{scroll:r})},prefetch(e){eP.prefetch(e)}},eC={},eR=(0,_.createStyleRegistry)(),ej={ampFirst:!0===j.amp,hasQuery:!!i.amp,hybrid:"hybrid"===j.amp},e$=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(ej),eO=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(e$),ek=[],eM={};ey&&(eM.beforeInteractive=[].concat(ey()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let ez=({children:e})=>(0,y.jsx)(eH.Provider,{value:e_,children:(0,y.jsx)(eA.Provider,{value:eP.isReady&&eP.query?new URL(eP.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eB,{router:eP,isAutoExport:ew,children:(0,y.jsx)(eI.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=eu(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=U.find(t=>e.startsWith(t)),o=e.match(eF);if(t&&o){let{key:e,optional:s,repeat:a}=eq(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eD(t)+"([^/]+?)"}if(!o)return"/"+eD(e);{let{key:e,repeat:t,optional:s}=eq(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eP),children:(0,y.jsx)(H.Provider,{value:eP,children:(0,y.jsx)(L.Provider,{value:ej,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eO=e},updateScripts:e=>{eC=e},scripts:eM,mountedInstances:new Set},children:(0,y.jsx)(O.Provider,{value:e=>ek.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:eR,children:(0,y.jsx)(eT.Provider,{value:Y,children:e})})})})})})})})})}),eU=()=>null,eW=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eU,{}),(0,y.jsx)(ez,{children:(0,y.jsxs)(y.Fragment,{children:[w?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eU,{})]}):e,(0,y.jsx)(eU,{})]})})]}),eJ={err:b,req:ew?void 0:n,res:ew?void 0:s,pathname:a,query:i,asPath:eS,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eW,{children:eY(ea,ec,{...e,router:eP})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=eR.styles({nonce:t.nonce});return eR.flush(),{html:r,head:n,styles:o}}},eX=!ef&&(l.nextExport||w&&(ew||ep)),e1=()=>{let e=eR.styles();return eR.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(f=await X(ea,{AppTree:eJ.AppTree,Component:ec,router:eP,ctx:eJ}),(ef||M)&&m&&(f.__N_PREVIEW=!0),ef&&(f[R.NO]=!0),ef&&!ep){let e,t;try{e=await (0,en.getTracer)().trace(eo.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>I({...ex?{params:i}:void 0,...m?{draftMode:!0,preview:!0,previewData:h}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":em?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(C.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(C.Eo);if(r.length)throw Error(eK("getStaticProps",r));if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');v.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e0(e.redirect,n,"getStaticProps"),em)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
 See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`);e.props={__N_REDIRECT:e.redirect.destination,__N_REDIRECT_STATUS:er(e.redirect)},void 0!==e.redirect.basePath&&(e.props.__N_REDIRECT_BASE_PATH=e.redirect.basePath),v.isRedirect=!0}if((w||em)&&!v.isNotFound&&!N(a,"getStaticProps",e.props))throw Error("invariant: getStaticProps did not return valid props. Please report this.");if("revalidate"in e){if(e.revalidate&&"export"===l.nextConfigOutput)throw Error('ISR cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if("number"==typeof e.revalidate){if(Number.isInteger(e.revalidate)){if(e.revalidate<=0)throw Error(`A page's revalidate option can not be less than or equal to zero for ${n.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.
 
 To never revalidate, you can set revalidate to \`false\` (only ran once at build-time).
Diff for server.runtime.prod.js

Diff too large to display

Commit: 01cb497

@feedthejim feedthejim assigned wyattjoh and unassigned wyattjoh Jul 7, 2024
@unstubbable unstubbable force-pushed the fetch-server-response-options branch from 081535a to 07f0cba Compare July 8, 2024 22:26
@unstubbable unstubbable force-pushed the fetch-server-response-options branch from 07f0cba to 6eeaa7b Compare July 9, 2024 07:27
@unstubbable unstubbable force-pushed the fetch-server-response-options branch from 6eeaa7b to a7ce867 Compare July 9, 2024 07:34
@unstubbable unstubbable force-pushed the fetch-server-response-options branch from a7ce867 to 78b4331 Compare July 9, 2024 10:29
@unstubbable unstubbable force-pushed the fast-refresh-fetch-cache branch 2 times, most recently from ec75f5b to 1ef7e83 Compare July 9, 2024 13:45
@unstubbable unstubbable changed the base branch from fetch-server-response-options to wait-for-next-dev-server-test-restart July 9, 2024 15:13
@unstubbable unstubbable force-pushed the wait-for-next-dev-server-test-restart branch from 0c556a6 to f5dc235 Compare July 9, 2024 15:29
@unstubbable unstubbable force-pushed the fetch-server-response-options branch from 8a06418 to 8a50e26 Compare July 12, 2024 22:46
unstubbable added a commit that referenced this pull request Jul 13, 2024
…67526)

This is in preparation for adding another option in #67527.
Base automatically changed from fetch-server-response-options to canary July 13, 2024 15:49
@unstubbable unstubbable merged commit 57baeec into canary Jul 13, 2024
105 checks passed
@unstubbable unstubbable deleted the fast-refresh-fetch-cache branch July 13, 2024 16:23
unstubbable added a commit that referenced this pull request Jul 17, 2024
The target release for the [server components HMR
cache](#67527) feature is 15, so
we want to enable it already for canaries.
unstubbable added a commit that referenced this pull request Jul 19, 2024
When the config `logging.fetches` (see
https://nextjs.org/docs/app/api-reference/next-config-js/logging) is
defined, any fetch requests that are done in server components should be
logged. This is currently not the case for client-side navigations in
the app router. This PR fixes that, and also cleans up the log format a
bit. In addition, cached requests for the purpose of HMR refreshes (see
#67527) are explicitly omitted from the logs.

**Before**

<img width="963" alt="fetch logs before"
src="https://github.com/user-attachments/assets/f3d50495-1168-4e75-933e-635931f6efb0">

**After**

<img width="908" alt="fetch logs after"
src="https://github.com/user-attachments/assets/0933964c-1e02-4f14-b059-1ce536abec71">

Note that warnings for conflicting fetch cache configs are now
co-located with the logged fetch metrics. If `logging.fetches` is not
enabled, the warnings are still logged, as was the case before. They are
now only logged in dev mode though, which was not the case before.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants