Skip to content

Commit

Permalink
v10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Oct 27, 2020
1 parent 308ec39 commit 118ab79
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Expand Up @@ -17,5 +17,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "9.5.6-canary.18"
"version": "10.0.0"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"description": "ESLint plugin for NextJS.",
"main": "lib/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-google-analytics/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-google-analytics",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-google-analytics"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-sentry/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-sentry",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-sentry"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions packages/next/package.json
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -79,10 +79,10 @@
"@babel/runtime": "7.11.2",
"@babel/types": "7.11.5",
"@hapi/accept": "5.0.1",
"@next/env": "9.5.6-canary.18",
"@next/polyfill-module": "9.5.6-canary.18",
"@next/react-dev-overlay": "9.5.6-canary.18",
"@next/react-refresh-utils": "9.5.6-canary.18",
"@next/env": "10.0.0",
"@next/polyfill-module": "10.0.0",
"@next/react-dev-overlay": "10.0.0",
"@next/react-refresh-utils": "10.0.0",
"ast-types": "0.13.2",
"babel-plugin-transform-define": "2.0.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
Expand Down Expand Up @@ -129,7 +129,7 @@
"sharp": "0.26.2"
},
"devDependencies": {
"@next/polyfill-nomodule": "9.5.6-canary.18",
"@next/polyfill-nomodule": "10.0.0",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "9.5.6-canary.18",
"version": "10.0.0",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down

6 comments on commit 118ab79

@orzklv
Copy link

@orzklv orzklv commented on 118ab79 Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woooooaaaah

@LucaNerlich
Copy link

@LucaNerlich LucaNerlich commented on 118ab79 Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

Time to celebrate 🥳

@jillesmc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow!!!!
🥇

@ijjk
Copy link
Member

@ijjk ijjk commented on 118ab79 Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stats from current release

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
buildDuration 13.3s 13.4s ⚠️ +102ms
nodeModulesSize 62.5 MB 91.3 MB ⚠️ +28.8 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
/ failed reqs 0 0
/ total time (seconds) 2.537 2.67 ⚠️ +0.13
/ avg req/sec 985.38 936.28 ⚠️ -49.1
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.38 1.413 ⚠️ +0.03
/error-in-render avg req/sec 1811.25 1769.62 ⚠️ -41.63
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..9b19.js gzip 11.1 kB 11.3 kB ⚠️ +201 B
framework.HASH.js gzip 39 kB 39 kB
main-51c1c2f..7e91.js gzip 7.23 kB 7.33 kB ⚠️ +98 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.3 kB ⚠️ +299 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..dule.js gzip 6.9 kB 7.03 kB ⚠️ +126 B
framework.HA..dule.js gzip 39 kB 39 kB
main-87d379f..dule.js gzip 6.29 kB 6.31 kB ⚠️ +28 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 53.1 kB ⚠️ +154 B
Legacy Client Bundles (polyfills)
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.35 kB ⚠️ +28 B
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.75 kB ⚠️ +28 B
Client Pages Modern Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.31 kB ⚠️ +26 B
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.4 kB ⚠️ +26 B
Client Build Manifests
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
index.html gzip 1 kB 1 kB -2 B
link.html gzip 1.01 kB 1.01 kB -3 B
withRouter.html gzip 997 B 996 B -1 B
Overall change 3.01 kB 3.01 kB -6 B

Diffs

Diff for _buildManifest.js
@@ -7,7 +7,7 @@ self.__BUILD_MANIFEST = {
   "/hooks": [
     "static\u002Fchunks\u002Fpages\u002Fhooks-8001dc76075832ee8949.js"
   ],
-  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-67e857671520c009f99f.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-904912004ceca08709a4.js"],
   "/routerDirect": [
     "static\u002Fchunks\u002Fpages\u002FrouterDirect-2e9bfd441bd88cd3382e.js"
   ],
Diff for _buildManifest.module.js
@@ -10,7 +10,7 @@ self.__BUILD_MANIFEST = {
     "static\u002Fchunks\u002Fpages\u002Fhooks-56fa58a6f0993d7d36d7.module.js"
   ],
   "/link": [
-    "static\u002Fchunks\u002Fpages\u002Flink-1de2ef9a42400a3bd1f2.module.js"
+    "static\u002Fchunks\u002Fpages\u002Flink-306d7b0a56e411f2198f.module.js"
   ],
   "/routerDirect": [
     "static\u002Fchunks\u002Fpages\u002FrouterDirect-368af3dfef3c9cd99dc3.module.js"
Diff for link-1de2ef9..f2.module.js
@@ -161,7 +161,16 @@
         );
       }
 
-      function linkClicked(e, router, href, as, replace, shallow, scroll) {
+      function linkClicked(
+        e,
+        router,
+        href,
+        as,
+        replace,
+        shallow,
+        scroll,
+        locale
+      ) {
         var { nodeName } = e.currentTarget;
 
         if (
@@ -179,7 +188,8 @@
         } // replace state instead of push if prop is present
 
         router[replace ? "replace" : "push"](href, as, {
-          shallow
+          shallow,
+          locale
         }).then(success => {
           if (!success) return;
 
@@ -239,7 +249,7 @@
           }
         }, [p, childElm, href, as, router]);
 
-        var { children, replace, shallow, scroll } = props; // Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag
+        var { children, replace, shallow, scroll, locale } = props; // Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag
 
         if (typeof children === "string") {
           children = /*#__PURE__*/ _react.default.createElement(
@@ -268,7 +278,16 @@
             }
 
             if (!e.defaultPrevented) {
-              linkClicked(e, router, href, as, replace, shallow, scroll);
+              linkClicked(
+                e,
+                router,
+                href,
+                as,
+                replace,
+                shallow,
+                scroll,
+                locale
+              );
             }
           }
         };
@@ -295,7 +314,7 @@
           childProps.href = (0, _router.addBasePath)(
             (0, _router.addLocale)(
               as,
-              router && router.locale,
+              typeof locale !== "undefined" ? locale : router && router.locale,
               router && router.defaultLocale
             )
           );
Diff for link-67e8576..0c009f99f.js
@@ -165,7 +165,16 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         );
       }
 
-      function linkClicked(e, router, href, as, replace, shallow, scroll) {
+      function linkClicked(
+        e,
+        router,
+        href,
+        as,
+        replace,
+        shallow,
+        scroll,
+        locale
+      ) {
         var nodeName = e.currentTarget.nodeName;
 
         if (
@@ -183,7 +192,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         } // replace state instead of push if prop is present
 
         router[replace ? "replace" : "push"](href, as, {
-          shallow: shallow
+          shallow: shallow,
+          locale: locale
         }).then(function(success) {
           if (!success) return;
 
@@ -258,7 +268,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         var children = props.children,
           replace = props.replace,
           shallow = props.shallow,
-          scroll = props.scroll; // Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag
+          scroll = props.scroll,
+          locale = props.locale; // Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag
 
         if (typeof children === "string") {
           children = /*#__PURE__*/ _react["default"].createElement(
@@ -287,7 +298,16 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
             }
 
             if (!e.defaultPrevented) {
-              linkClicked(e, router, href, as, replace, shallow, scroll);
+              linkClicked(
+                e,
+                router,
+                href,
+                as,
+                replace,
+                shallow,
+                scroll,
+                locale
+              );
             }
           }
         };
@@ -314,7 +334,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           childProps.href = (0, _router.addBasePath)(
             (0, _router.addLocale)(
               as,
-              router && router.locale,
+              typeof locale !== "undefined" ? locale : router && router.locale,
               router && router.defaultLocale
             )
           );
Diff for 677f882d2ed8..4eeebf399.js
@@ -936,6 +936,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       var manualScrollRestoration = false && false;
+      var SSG_DATA_NOT_FOUND_ERROR = "SSG Data NOT_FOUND";
 
       function fetchRetry(url, attempts) {
         return fetch(url, {
@@ -957,6 +958,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
               return fetchRetry(url, attempts - 1);
             }
 
+            if (res.status === 404) {
+              // TODO: handle reloading in development from fallback returning 200
+              // to on-demand-entry-handler causing it to reload periodically
+              throw new Error(SSG_DATA_NOT_FOUND_ERROR);
+            }
+
             throw new Error("Failed to load static props");
           }
 
@@ -1081,7 +1088,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
               url,
               as,
               Object.assign({}, options, {
-                shallow: options.shallow && _this._shallow
+                shallow: options.shallow && _this._shallow,
+                locale: options.locale || _this.defaultLocale
               })
             );
           }; // represents the current component key
@@ -1237,7 +1245,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 ) {
                   var _this2 = this;
 
-                  var cleanedAs,
+                  var _require,
+                    normalizeLocalePath,
+                    localePathResult,
+                    cleanedAs,
                     pages,
                     _yield$this$pageLoade,
                     rewrites,
@@ -1280,6 +1291,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             return _context.abrupt("return", false);
 
                           case 3:
+                            if (false) {
+                            }
+
                             if (!options._h) {
                               this.isSsr = false;
                             } // marking route changes as a navigation start entry
@@ -1292,7 +1306,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               this.abortComponentLoad(this._inFlightRoute);
                             }
 
-                            as = addLocale(as, this.locale, this.defaultLocale);
+                            as = addLocale(
+                              as,
+                              options.locale,
+                              this.defaultLocale
+                            );
                             cleanedAs = delLocale(
                               hasBasePath(as) ? delBasePath(as) : as,
                               this.locale
@@ -1306,7 +1324,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             if (
                               !(!options._h && this.onlyAHashChange(cleanedAs))
                             ) {
-                              _context.next = 17;
+                              _context.next = 18;
                               break;
                             }
 
@@ -1319,16 +1337,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             Router.events.emit("hashChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 17:
-                            _context.next = 19;
+                          case 18:
+                            _context.next = 20;
                             return this.pageLoader.getPageList();
 
-                          case 19:
+                          case 20:
                             pages = _context.sent;
-                            _context.next = 22;
+                            _context.next = 23;
                             return this.pageLoader.promisedBuildManifest;
 
-                          case 22:
+                          case 23:
                             _yield$this$pageLoade = _context.sent;
                             rewrites = _yield$this$pageLoade.__rewrites;
                             parsed = (0, _parseRelativeUrl.parseRelativeUrl)(
@@ -1383,7 +1401,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
 
                             if (!(0, _isDynamic.isDynamicRoute)(route)) {
-                              _context.next = 50;
+                              _context.next = 51;
                               break;
                             }
 
@@ -1406,7 +1424,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 (shouldInterpolate && !interpolatedAs.result)
                               )
                             ) {
-                              _context.next = 49;
+                              _context.next = 50;
                               break;
                             }
 
@@ -1417,7 +1435,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             });
 
                             if (!(missingParams.length > 0)) {
-                              _context.next = 47;
+                              _context.next = 48;
                               break;
                             }
 
@@ -1448,11 +1466,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 )
                             );
 
-                          case 47:
-                            _context.next = 50;
+                          case 48:
+                            _context.next = 51;
                             break;
 
-                          case 49:
+                          case 50:
                             if (shouldInterpolate) {
                               as = (0, _utils.formatWithValidation)(
                                 Object.assign({}, parsedAs, {
@@ -1468,10 +1486,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               Object.assign(query, routeMatch);
                             }
 
-                          case 50:
+                          case 51:
                             Router.events.emit("routeChangeStart", as);
-                            _context.prev = 51;
-                            _context.next = 54;
+                            _context.prev = 52;
+                            _context.next = 55;
                             return this.getRouteInfo(
                               route,
                               pathname,
@@ -1480,7 +1498,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               shallow
                             );
 
-                          case 54:
+                          case 55:
                             routeInfo = _context.sent;
                             (error = routeInfo.error),
                               (props = routeInfo.props),
@@ -1495,7 +1513,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 props.pageProps.__N_REDIRECT
                               )
                             ) {
-                              _context.next = 65;
+                              _context.next = 66;
                               break;
                             }
 
@@ -1504,7 +1522,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             // it's not
 
                             if (!destination.startsWith("/")) {
-                              _context.next = 63;
+                              _context.next = 64;
                               break;
                             }
 
@@ -1514,40 +1532,40 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             this._resolveHref(parsedHref, pages);
 
                             if (!pages.includes(parsedHref.pathname)) {
-                              _context.next = 63;
+                              _context.next = 64;
                               break;
                             }
 
                             return _context.abrupt(
                               "return",
                               this.change(
-                                "replaceState",
+                                method,
                                 destination,
                                 destination,
                                 options
                               )
                             );
 
-                          case 63:
+                          case 64:
                             window.location.href = destination;
                             return _context.abrupt(
                               "return",
                               new Promise(function() {})
                             );
 
-                          case 65:
+                          case 66:
                             Router.events.emit("beforeHistoryChange", as);
                             this.changeState(
                               method,
                               url,
-                              addLocale(as, this.locale, this.defaultLocale),
+                              addLocale(as, options.locale, this.defaultLocale),
                               options
                             );
 
                             if (false) {
                             }
 
-                            _context.next = 70;
+                            _context.next = 71;
                             return this.set(
                               route,
                               pathname,
@@ -1559,9 +1577,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               else throw e;
                             });
 
-                          case 70:
+                          case 71:
                             if (!error) {
-                              _context.next = 73;
+                              _context.next = 74;
                               break;
                             }
 
@@ -1572,28 +1590,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             throw error;
 
-                          case 73:
+                          case 74:
                             if (false) {
                             }
 
                             Router.events.emit("routeChangeComplete", as);
                             return _context.abrupt("return", true);
 
-                          case 78:
-                            _context.prev = 78;
-                            _context.t0 = _context["catch"](51);
+                          case 79:
+                            _context.prev = 79;
+                            _context.t0 = _context["catch"](52);
 
                             if (!_context.t0.cancelled) {
-                              _context.next = 82;
+                              _context.next = 83;
                               break;
                             }
 
                             return _context.abrupt("return", false);
 
-                          case 82:
+                          case 83:
                             throw _context.t0;
 
-                          case 83:
+                          case 84:
                           case "end":
                             return _context.stop();
                         }
@@ -1601,7 +1619,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     },
                     _callee,
                     this,
-                    [[51, 78]]
+                    [[52, 79]]
                   );
                 })
               );
@@ -1652,7 +1670,14 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                   as,
                   loadErrorFail
                 ) {
-                  var _yield$this$fetchComp, Component, styleSheets, routeInfo;
+                  var Component,
+                    styleSheets,
+                    props,
+                    ssg404,
+                    mod,
+                    _yield$this$fetchComp,
+                    _yield$this$fetchComp2,
+                    routeInfo;
 
                   return _regeneratorRuntime.wrap(
                     function _callee2$(_context2) {
@@ -1685,51 +1710,114 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
                           case 6:
                             _context2.prev = 6;
-                            _context2.next = 9;
-                            return this.fetchComponent("/_error");
+                            ssg404 = err.message === SSG_DATA_NOT_FOUND_ERROR;
 
-                          case 9:
+                            if (!ssg404) {
+                              _context2.next = 24;
+                              break;
+                            }
+
+                            _context2.prev = 9;
+                            _context2.next = 12;
+                            return this.fetchComponent("/404");
+
+                          case 12:
                             _yield$this$fetchComp = _context2.sent;
                             Component = _yield$this$fetchComp.page;
                             styleSheets = _yield$this$fetchComp.styleSheets;
+                            mod = _yield$this$fetchComp.mod;
+
+                            if (!(mod && mod.__N_SSG)) {
+                              _context2.next = 20;
+                              break;
+                            }
+
+                            _context2.next = 19;
+                            return this._getStaticData(
+                              this.pageLoader.getDataHref(
+                                "/404",
+                                "/404",
+                                true,
+                                this.locale
+                              )
+                            );
+
+                          case 19:
+                            props = _context2.sent;
+
+                          case 20:
+                            _context2.next = 24;
+                            break;
+
+                          case 22:
+                            _context2.prev = 22;
+                            _context2.t0 = _context2["catch"](9);
+
+                          case 24:
+                            if (
+                              !(
+                                typeof Component === "undefined" ||
+                                typeof styleSheets === "undefined"
+                              )
+                            ) {
+                              _context2.next = 31;
+                              break;
+                            }
+
+                            _context2.next = 28;
+                            return this.fetchComponent("/_error");
+
+                          case 28:
+                            _yield$this$fetchComp2 = _context2.sent;
+                            Component = _yield$this$fetchComp2.page;
+                            styleSheets = _yield$this$fetchComp2.styleSheets;
+
+                          case 31:
                             routeInfo = {
+                              props: props,
                               Component: Component,
                               styleSheets: styleSheets,
-                              err: err,
-                              error: err
+                              err: ssg404 ? undefined : err,
+                              error: ssg404 ? undefined : err
                             };
-                            _context2.prev = 13;
-                            _context2.next = 16;
+
+                            if (routeInfo.props) {
+                              _context2.next = 43;
+                              break;
+                            }
+
+                            _context2.prev = 33;
+                            _context2.next = 36;
                             return this.getInitialProps(Component, {
                               err: err,
                               pathname: pathname,
                               query: query
                             });
 
-                          case 16:
+                          case 36:
                             routeInfo.props = _context2.sent;
-                            _context2.next = 23;
+                            _context2.next = 43;
                             break;
 
-                          case 19:
-                            _context2.prev = 19;
-                            _context2.t0 = _context2["catch"](13);
+                          case 39:
+                            _context2.prev = 39;
+                            _context2.t1 = _context2["catch"](33);
                             console.error(
                               "Error in error page `getInitialProps`: ",
-                              _context2.t0
+                              _context2.t1
                             );
                             routeInfo.props = {};
 
-                          case 23:
+                          case 43:
                             return _context2.abrupt("return", routeInfo);
 
-                          case 26:
-                            _context2.prev = 26;
-                            _context2.t1 = _context2["catch"](6);
+                          case 46:
+                            _context2.prev = 46;
+                            _context2.t2 = _context2["catch"](6);
                             return _context2.abrupt(
                               "return",
                               this.handleRouteInfoError(
-                                _context2.t1,
+                                _context2.t2,
                                 pathname,
                                 query,
                                 as,
@@ -1737,7 +1825,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               )
                             );
 
-                          case 29:
+                          case 49:
                           case "end":
                             return _context2.stop();
                         }
@@ -1746,8 +1834,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     _callee2,
                     this,
                     [
-                      [6, 26],
-                      [13, 19]
+                      [6, 46],
+                      [9, 22],
+                      [33, 39]
                     ]
                   );
                 })
@@ -1778,7 +1867,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                     Component,
                     __N_SSG,
                     __N_SSP,
-                    _require,
+                    _require2,
                     isValidElementType,
                     dataHref,
                     props,
@@ -1846,7 +1935,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               break;
                             }
 
-                            (_require = __webpack_require__(
+                            (_require2 = __webpack_require__(
                               !(function webpackMissingModule() {
                                 var e = new Error(
                                   "Cannot find module 'react-is'"
@@ -1856,7 +1945,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               })()
                             )),
                               (isValidElementType =
-                                _require.isValidElementType);
+                                _require2.isValidElementType);
 
                             if (isValidElementType(Component)) {
                               _context3.next = 18;
@@ -1879,8 +1968,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 }),
                                 delBasePath(as),
                                 __N_SSG,
-                                this.locale,
-                                this.defaultLocale
+                                this.locale
                               );
                             }
Diff for 677f882d2ed8..20.module.js
@@ -792,6 +792,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       var manualScrollRestoration = false && false;
+      var SSG_DATA_NOT_FOUND_ERROR = "SSG Data NOT_FOUND";
 
       function fetchRetry(url, attempts) {
         return fetch(url, {
@@ -813,6 +814,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
               return fetchRetry(url, attempts - 1);
             }
 
+            if (res.status === 404) {
+              // TODO: handle reloading in development from fallback returning 200
+              // to on-demand-entry-handler causing it to reload periodically
+              throw new Error(SSG_DATA_NOT_FOUND_ERROR);
+            }
+
             throw new Error("Failed to load static props");
           }
 
@@ -925,7 +932,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
               url,
               as,
               Object.assign({}, options, {
-                shallow: options.shallow && this._shallow
+                shallow: options.shallow && this._shallow,
+                locale: options.locale || this.defaultLocale
               })
             );
           }; // represents the current component key
@@ -1060,6 +1068,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             return false;
           }
 
+          if (false) {
+            var localePathResult, normalizeLocalePath;
+          }
+
           if (!options._h) {
             this.isSsr = false;
           } // marking route changes as a navigation start entry
@@ -1072,7 +1084,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             this.abortComponentLoad(this._inFlightRoute);
           }
 
-          as = addLocale(as, this.locale, this.defaultLocale);
+          as = addLocale(as, options.locale, this.defaultLocale);
           var cleanedAs = delLocale(
             hasBasePath(as) ? delBasePath(as) : as,
             this.locale
@@ -1223,12 +1235,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 this._resolveHref(parsedHref, pages);
 
                 if (pages.includes(parsedHref.pathname)) {
-                  return this.change(
-                    "replaceState",
-                    destination,
-                    destination,
-                    options
-                  );
+                  return this.change(method, destination, destination, options);
                 }
               }
 
@@ -1240,7 +1247,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             this.changeState(
               method,
               url,
-              addLocale(as, this.locale, this.defaultLocale),
+              addLocale(as, options.locale, this.defaultLocale),
               options
             );
 
@@ -1320,25 +1327,67 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           }
 
           try {
-            var { page: Component, styleSheets } = await this.fetchComponent(
-              "/_error"
-            );
+            var Component;
+            var styleSheets;
+            var props;
+            var ssg404 = err.message === SSG_DATA_NOT_FOUND_ERROR;
+
+            if (ssg404) {
+              try {
+                var mod;
+                ({
+                  page: Component,
+                  styleSheets,
+                  mod
+                } = await this.fetchComponent("/404")); // TODO: should we tolerate these props missing and still render the
+                // page instead of falling back to _error?
+
+                if (mod && mod.__N_SSG) {
+                  props = await this._getStaticData(
+                    this.pageLoader.getDataHref(
+                      "/404",
+                      "/404",
+                      true,
+                      this.locale
+                    )
+                  );
+                }
+              } catch (_err) {
+                // non-fatal fallback to _error
+              }
+            }
+
+            if (
+              typeof Component === "undefined" ||
+              typeof styleSheets === "undefined"
+            ) {
+              ({ page: Component, styleSheets } = await this.fetchComponent(
+                "/_error"
+              ));
+            }
+
             var routeInfo = {
+              props,
               Component,
               styleSheets,
-              err,
-              error: err
+              err: ssg404 ? undefined : err,
+              error: ssg404 ? undefined : err
             };
 
-            try {
-              routeInfo.props = await this.getInitialProps(Component, {
-                err,
-                pathname,
-                query
-              });
-            } catch (gipErr) {
-              console.error("Error in error page `getInitialProps`: ", gipErr);
-              routeInfo.props = {};
+            if (!routeInfo.props) {
+              try {
+                routeInfo.props = await this.getInitialProps(Component, {
+                  err,
+                  pathname,
+                  query
+                });
+              } catch (gipErr) {
+                console.error(
+                  "Error in error page `getInitialProps`: ",
+                  gipErr
+                );
+                routeInfo.props = {};
+              }
             }
 
             return routeInfo;
@@ -1390,8 +1439,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 }),
                 delBasePath(as),
                 __N_SSG,
-                this.locale,
-                this.defaultLocale
+                this.locale
               );
             }
Diff for main-8e73dd2..68413e28f.js
@@ -341,7 +341,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         document.getElementById("__NEXT_DATA__").textContent
       );
       window.__NEXT_DATA__ = data;
-      var version = "9.5.5";
+      var version = "10.0.0";
       exports.version = version;
       var hydrateProps = data.props,
         hydrateErr = data.err,
@@ -353,9 +353,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         dynamicIds = data.dynamicIds,
         isFallback = data.isFallback,
         initialHeadData = data.head,
-        locales = data.locales,
+        locales = data.locales;
+      var locale = data.locale,
         defaultLocale = data.defaultLocale;
-      var locale = data.locale;
       var prefix = assetPrefix || ""; // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time
       // So, this is how we do it in the client side at runtime
 
@@ -372,10 +372,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         asPath = (0, _router.delBasePath)(asPath);
       }
 
-      asPath = (0, _router.delLocale)(asPath, locale);
-
       if (false) {
-        var localePathResult, _require, normalizeLocalePath;
+        var detectedDomain,
+          localePathResult,
+          _require2,
+          detectDomainLocale,
+          _require,
+          normalizeLocalePath;
       }
 
       var pageLoader = new _pageLoader["default"](buildId, prefix, page);
@@ -502,7 +505,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
               if (true) {
                 return this.props.children;
               } else {
-                var _require2, ReactDevOverlay;
+                var _require3, ReactDevOverlay;
               }
             }
           }
@@ -523,9 +526,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
               mod,
               initialErr,
               _yield$pageLoader$loa2,
-              _require3,
-              isValidElementType,
               _require4,
+              isValidElementType,
+              _require5,
               getNodeError,
               renderCtx,
               _args = arguments;
@@ -602,14 +605,14 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         break;
                       }
 
-                      (_require3 = __webpack_require__(
+                      (_require4 = __webpack_require__(
                         !(function webpackMissingModule() {
                           var e = new Error("Cannot find module 'react-is'");
                           e.code = "MODULE_NOT_FOUND";
                           throw e;
                         })()
                       )),
-                        (isValidElementType = _require3.isValidElementType);
+                        (isValidElementType = _require4.isValidElementType);
 
                       if (isValidElementType(CachedComponent)) {
                         _context.next = 21;
@@ -859,10 +862,6 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
             _reactDom["default"].hydrate(reactEl, domEl, markHydrateComplete);
 
             isInitialRender = false;
-
-            if (onPerfEntry && _utils.ST) {
-              (0, _performanceRelayer["default"])(onPerfEntry);
-            }
           } else {
             _reactDom["default"].render(reactEl, domEl, markRenderComplete);
           }
@@ -1159,7 +1158,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
               window.__NEXT_HYDRATED_CB();
             }
           }, []);
-        }
+        } // We should ask to measure the Web Vitals after rendering completes so we
+        // don't cause any hydration delay:
+
+        _react["default"].useEffect(function() {
+          (0, _performanceRelayer["default"])(onPerfEntry);
+        }, []);
 
         return children;
       }
@@ -1251,12 +1255,38 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
 
       var _webVitals = __webpack_require__("w6Sm");
 
+      var initialHref = location.href;
+      var isRegistered = false;
+      var userReportHandler;
+
+      function onReport(metric) {
+        if (userReportHandler) {
+          userReportHandler(metric);
+        } // This code is not shipped, executed, or present in the client-side
+        // JavaScript bundle unless explicitly enabled in your application.
+        //
+        // When this feature is enabled, we'll make it very clear by printing a
+        // message during the build (`next build`).
+
+        if (false) {
+          var vitalsUrl, blob, body;
+        }
+      }
+
       var _default = function _default(onPerfEntry) {
-        (0, _webVitals.getCLS)(onPerfEntry);
-        (0, _webVitals.getFID)(onPerfEntry);
-        (0, _webVitals.getFCP)(onPerfEntry);
-        (0, _webVitals.getLCP)(onPerfEntry);
-        (0, _webVitals.getTTFB)(onPerfEntry);
+        // Update function if it changes:
+        userReportHandler = onPerfEntry; // Only register listeners once:
+
+        if (isRegistered) {
+          return;
+        }
+
+        isRegistered = true;
+        (0, _webVitals.getCLS)(onReport);
+        (0, _webVitals.getFID)(onReport);
+        (0, _webVitals.getFCP)(onReport);
+        (0, _webVitals.getLCP)(onReport);
+        (0, _webVitals.getTTFB)(onReport);
       };
 
       exports["default"] = _default;
@@ -1565,6 +1595,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1746,13 +1780,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1765,14 +1799,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           },
           {
             key: "getDataHref",
-            value: function getDataHref(
-              href,
-              asPath,
-              ssg,
-              locale,
-              defaultLocale
-            ) {
-              var _this2 = this;
+            value: function getDataHref(href, asPath, ssg, locale) {
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1787,12 +1815,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
               var getHrefForSlug = function getHrefForSlug(path) {
                 var dataRoute = (0, _router.addLocale)(
                   (0, _getAssetPathFromRoute["default"])(path, ".json"),
-                  locale,
-                  defaultLocale
+                  locale
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1814,8 +1841,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           },
           {
             key: "prefetchData",
-            value: function prefetchData(href, asPath, locale, defaultLocale) {
-              var _this3 = this;
+            value: function prefetchData(href, asPath, locale) {
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1825,12 +1852,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
-                    locale,
-                    defaultLocale
+                    locale
                   )) && // noop when data has already been prefetched (dedupe)
                   !document.querySelector(
                     'link[rel="'
@@ -1849,12 +1875,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1867,9 +1893,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1878,13 +1904,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1926,7 +1952,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1943,29 +1969,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2020,11 +2086,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2038,7 +2104,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2080,7 +2146,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-f21a93d..8d.module.js
@@ -258,7 +258,7 @@
         document.getElementById("__NEXT_DATA__").textContent
       );
       window.__NEXT_DATA__ = data;
-      var version = "9.5.5";
+      var version = "10.0.0";
       exports.version = version;
       var {
         props: hydrateProps,
@@ -271,10 +271,9 @@
         dynamicIds,
         isFallback,
         head: initialHeadData,
-        locales,
-        defaultLocale
+        locales
       } = data;
-      var { locale } = data;
+      var { locale, defaultLocale } = data;
       var prefix = assetPrefix || ""; // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time
       // So, this is how we do it in the client side at runtime
 
@@ -291,10 +290,11 @@
         asPath = (0, _router.delBasePath)(asPath);
       }
 
-      asPath = (0, _router.delLocale)(asPath, locale);
-
       if (false) {
-        var localePathResult, normalizeLocalePath;
+        var detectedDomain,
+          localePathResult,
+          detectDomainLocale,
+          normalizeLocalePath;
       }
 
       var pageLoader = new _pageLoader.default(buildId, prefix, page);
@@ -605,10 +605,6 @@
             _reactDom.default.hydrate(reactEl, domEl, markHydrateComplete);
 
             isInitialRender = false;
-
-            if (onPerfEntry && _utils.ST) {
-              (0, _performanceRelayer.default)(onPerfEntry);
-            }
           } else {
             _reactDom.default.render(reactEl, domEl, markRenderComplete);
           }
@@ -882,7 +878,12 @@
               window.__NEXT_HYDRATED_CB();
             }
           }, []);
-        }
+        } // We should ask to measure the Web Vitals after rendering completes so we
+        // don't cause any hydration delay:
+
+        _react.default.useEffect(() => {
+          (0, _performanceRelayer.default)(onPerfEntry);
+        }, []);
 
         return children;
       }
@@ -922,12 +923,38 @@
 
       var _webVitals = __webpack_require__("w6Sm");
 
+      var initialHref = location.href;
+      var isRegistered = false;
+      var userReportHandler;
+
+      function onReport(metric) {
+        if (userReportHandler) {
+          userReportHandler(metric);
+        } // This code is not shipped, executed, or present in the client-side
+        // JavaScript bundle unless explicitly enabled in your application.
+        //
+        // When this feature is enabled, we'll make it very clear by printing a
+        // message during the build (`next build`).
+
+        if (false) {
+          var vitalsUrl, blob, body;
+        }
+      }
+
       var _default = onPerfEntry => {
-        (0, _webVitals.getCLS)(onPerfEntry);
-        (0, _webVitals.getFID)(onPerfEntry);
-        (0, _webVitals.getFCP)(onPerfEntry);
-        (0, _webVitals.getLCP)(onPerfEntry);
-        (0, _webVitals.getTTFB)(onPerfEntry);
+        // Update function if it changes:
+        userReportHandler = onPerfEntry; // Only register listeners once:
+
+        if (isRegistered) {
+          return;
+        }
+
+        isRegistered = true;
+        (0, _webVitals.getCLS)(onReport);
+        (0, _webVitals.getFID)(onReport);
+        (0, _webVitals.getFCP)(onReport);
+        (0, _webVitals.getLCP)(onReport);
+        (0, _webVitals.getTTFB)(onReport);
       };
 
       exports.default = _default;
@@ -1410,7 +1437,7 @@
          * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
          */
 
-        getDataHref(href, asPath, ssg, locale, defaultLocale) {
+        getDataHref(href, asPath, ssg, locale) {
           var { pathname: hrefPathname, query, search } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
           var { pathname: asPathname } = (0,
@@ -1420,8 +1447,7 @@
           var getHrefForSlug = path => {
             var dataRoute = (0, _router.addLocale)(
               (0, _getAssetPathFromRoute.default)(path, ".json"),
-              locale,
-              defaultLocale
+              locale
             );
             return (0, _router.addBasePath)(
               "/_next/data/"
@@ -1444,7 +1470,7 @@
          * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
          */
 
-        prefetchData(href, asPath, locale, defaultLocale) {
+        prefetchData(href, asPath, locale) {
           var { pathname: hrefPathname } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
           var route = normalizeRoute(hrefPathname);
@@ -1454,13 +1480,7 @@
               _dataHref // Check if the route requires a data file
             ) =>
               s.has(route) && // Try to generate data href, noop when falsy
-              (_dataHref = this.getDataHref(
-                href,
-                asPath,
-                true,
-                locale,
-                defaultLocale
-              )) && // noop when data has already been prefetched (dedupe)
+              (_dataHref = this.getDataHref(href, asPath, true, locale)) && // noop when data has already been prefetched (dedupe)
               !document.querySelector(
                 'link[rel="'
                   .concat(relPrefetch, '"][href^="')
@@ -1557,21 +1577,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-f21a93d0c5df5ac1d18d.module.js"
+      href="/_next/static/chunks/main-be7e36e77cded33c5dd2.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c5c4f34cb1aaaa3c077.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-8e73dd227e768413e28f.js"
+      src="/_next/static/chunks/main-372f6f630491ac138fc9.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-f21a93d0c5df5ac1d18d.module.js"
+      src="/_next/static/chunks/main-be7e36e77cded33c5dd2.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -121,13 +121,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5ddaca5d46f05a42e394.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c5c4f34cb1aaaa3c077.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-f21a93d0c5df5ac1d18d.module.js"
+      href="/_next/static/chunks/main-be7e36e77cded33c5dd2.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c5c4f34cb1aaaa3c077.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/link-1de2ef9a42400a3bd1f2.module.js"
+      href="/_next/static/chunks/pages/link-306d7b0a56e411f2198f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-8e73dd227e768413e28f.js"
+      src="/_next/static/chunks/main-372f6f630491ac138fc9.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-f21a93d0c5df5ac1d18d.module.js"
+      src="/_next/static/chunks/main-be7e36e77cded33c5dd2.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -126,13 +126,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5ddaca5d46f05a42e394.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c5c4f34cb1aaaa3c077.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -150,13 +150,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-67e857671520c009f99f.js"
+      src="/_next/static/chunks/pages/link-904912004ceca08709a4.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-1de2ef9a42400a3bd1f2.module.js"
+      src="/_next/static/chunks/pages/link-306d7b0a56e411f2198f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-f21a93d0c5df5ac1d18d.module.js"
+      href="/_next/static/chunks/main-be7e36e77cded33c5dd2.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c5c4f34cb1aaaa3c077.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-8e73dd227e768413e28f.js"
+      src="/_next/static/chunks/main-372f6f630491ac138fc9.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-f21a93d0c5df5ac1d18d.module.js"
+      src="/_next/static/chunks/main-be7e36e77cded33c5dd2.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -121,13 +121,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5ddaca5d46f05a42e394.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c5c4f34cb1aaaa3c077.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
buildDuration 14.8s 15s ⚠️ +236ms
nodeModulesSize 62.5 MB 91.3 MB ⚠️ +28.8 MB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..9b19.js gzip 11.1 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-51c1c2f..7e91.js gzip 7.23 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..3aa9.js gzip N/A 11.3 kB N/A
main-fc2ed98..cd2b.js gzip N/A 7.33 kB N/A
Overall change 58 kB 58.3 kB ⚠️ +299 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..dule.js gzip 6.9 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-87d379f..dule.js gzip 6.29 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 7.03 kB N/A
main-20f9619..dule.js gzip N/A 6.31 kB N/A
Overall change 52.9 kB 53.1 kB ⚠️ +154 B
Legacy Client Bundles (polyfills)
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB N/A N/A
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
link-41ceea0..6b62.js gzip N/A 1.35 kB N/A
Overall change 7.73 kB 7.75 kB ⚠️ +28 B
Client Pages Modern Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB N/A N/A
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
link-2d41a89..dule.js gzip N/A 1.31 kB N/A
Overall change 5.37 kB 5.4 kB ⚠️ +26 B
Client Build Manifests
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_error.js 1.05 MB 1.06 MB ⚠️ +3.46 kB
404.html 4.34 kB 4.73 kB ⚠️ +390 B
hooks.html 3.92 kB 3.92 kB
index.js 1.06 MB 1.06 MB ⚠️ +3.46 kB
link.js 1.1 MB 1.11 MB ⚠️ +4.79 kB
routerDirect.js 1.1 MB 1.1 MB ⚠️ +4.71 kB
withRouter.js 1.1 MB 1.1 MB ⚠️ +4.71 kB
Overall change 5.41 MB 5.43 MB ⚠️ +21.5 kB

@ricardomurillo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@philippe-desplats
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to test it all

Please sign in to comment.