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

Update to have default locale matched on root #17669

Merged
merged 19 commits into from Oct 8, 2020

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Oct 7, 2020

Follow-up PR to #17370 when the path is not prefixed with a locale and the default locale is the detected locale it doesn't redirect to locale prefixed variant. If the default locale path is visited and the default locale is visited this also redirects to the root removing the un-necessary locale in the URL.

This also exposes the defaultLocale on the router since the RFC mentions Setting a defaultLocale is required in every i18n library so it'd be useful for Next.js to provide it to the application. although doesn't explicitly spec where we want to expose it. If we want to expose it differently this can be updated.

x-ref: #17110

@ijjk ijjk added the type: next label Oct 7, 2020
@ijjk

This comment has been minimized.

…ault-locale

# Conflicts:
#	packages/next/build/webpack/loaders/next-serverless-loader.ts
#	packages/next/next-server/lib/i18n/normalize-locale-path.ts
#	packages/next/next-server/server/config.ts
#	packages/next/next-server/server/next-server.ts
#	packages/next/package.json
#	test/integration/i18n-support/test/index.test.js
@ijjk

This comment has been minimized.

@ijjk ijjk changed the title Update to not redirect when default locale matched on root Update to have default locale matched on root Oct 8, 2020
@ijjk
Copy link
Member Author

ijjk commented Oct 8, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
buildDuration 10.7s 10.6s -86ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +7.47 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
/ failed reqs 0 0
/ total time (seconds) 2.043 2.083 ⚠️ +0.04
/ avg req/sec 1223.5 1200.17 ⚠️ -23.33
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.203 1.271 ⚠️ +0.07
/error-in-render avg req/sec 2078.53 1967.69 ⚠️ -110.84
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..977d.js gzip 11 kB 11.1 kB ⚠️ +26 B
framework.HASH.js gzip 39 kB 39 kB
main-6f0de25..2754.js gzip 7.21 kB 7.23 kB ⚠️ +23 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58 kB ⚠️ +49 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..dule.js gzip 6.87 kB 6.9 kB ⚠️ +25 B
framework.HA..dule.js gzip 39 kB 39 kB
main-9ee6725..dule.js gzip 6.27 kB 6.29 kB ⚠️ +13 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +38 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-537beac..0f9a.js gzip 1.32 kB 1.32 kB ⚠️ +6 B
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.72 kB 7.73 kB ⚠️ +6 B
Client Pages Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-02f45f5..dule.js gzip 1.28 kB 1.28 kB ⚠️ +4 B
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB ⚠️ +4 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 330 B 329 B -1 B
Overall change 653 B 652 B -1 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
index.html gzip 1 kB 1 kB ⚠️ +2 B
link.html gzip 1.01 kB 1.01 kB ⚠️ +2 B
withRouter.html gzip 994 B 996 B ⚠️ +2 B
Overall change 3 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-943a64e08fa49f0674ac.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-67e857671520c009f99f.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-776abc716b587eb0f923.module.js"
+    "static\u002Fchunks\u002Fpages\u002Flink-1de2ef9a42400a3bd1f2.module.js"
   ],
   "/routerDirect": [
     "static\u002Fchunks\u002Fpages\u002FrouterDirect-368af3dfef3c9cd99dc3.module.js"
Diff for link-776abc7..23.module.js
@@ -293,7 +293,11 @@
           (child.type === "a" && !("href" in child.props))
         ) {
           childProps.href = (0, _router.addBasePath)(
-            (0, _router.addLocale)(as, router && router.locale)
+            (0, _router.addLocale)(
+              as,
+              router && router.locale,
+              router && router.defaultLocale
+            )
           );
         }
Diff for link-943a64e..49f0674ac.js
@@ -312,7 +312,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           (child.type === "a" && !("href" in child.props))
         ) {
           childProps.href = (0, _router.addBasePath)(
-            (0, _router.addLocale)(as, router && router.locale)
+            (0, _router.addLocale)(
+              as,
+              router && router.locale,
+              router && router.defaultLocale
+            )
           );
         }
Diff for 677f882d2ed8..9d.module.js
@@ -615,7 +615,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           : path;
       }
 
-      function addLocale(path, locale) {
+      function addLocale(path, locale, defaultLocale) {
         if (false) {
         }
 
@@ -850,7 +850,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             subscription,
             isFallback,
             locale,
-            locales
+            locales,
+            defaultLocale
           } = _ref;
           this.route = void 0;
           this.pathname = void 0;
@@ -871,6 +872,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this._shallow = void 0;
           this.locale = void 0;
           this.locales = void 0;
+          this.defaultLocale = void 0;
 
           this.onPopState = e => {
             var state = e.state;
@@ -1070,7 +1072,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             this.abortComponentLoad(this._inFlightRoute);
           }
 
-          as = addLocale(as, this.locale);
+          as = addLocale(as, this.locale, this.defaultLocale);
           var cleanedAs = delLocale(
             hasBasePath(as) ? delBasePath(as) : as,
             this.locale
@@ -1235,7 +1237,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             }
 
             Router.events.emit("beforeHistoryChange", as);
-            this.changeState(method, url, addLocale(as, this.locale), options);
+            this.changeState(
+              method,
+              url,
+              addLocale(as, this.locale, this.defaultLocale),
+              options
+            );
 
             if (false) {
               var appComp;
@@ -1383,7 +1390,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 }),
                 delBasePath(as),
                 __N_SSG,
-                this.locale
+                this.locale,
+                this.defaultLocale
               );
             }
 
@@ -1537,7 +1545,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             pathname
           );
           await Promise.all([
-            this.pageLoader.prefetchData(url, asPath),
+            this.pageLoader.prefetchData(
+              url,
+              asPath,
+              this.locale,
+              this.defaultLocale
+            ),
             this.pageLoader[options.priority ? "loadPage" : "prefetch"](route)
           ]);
         }
@@ -1931,7 +1944,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         "isFallback",
         "basePath",
         "locale",
-        "locales"
+        "locales",
+        "defaultLocale"
       ];
       var routerEvents = [
         "routeChangeStart",
Diff for 677f882d2ed8..29df91531.js
@@ -754,7 +754,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           : path;
       }
 
-      function addLocale(path, locale) {
+      function addLocale(path, locale, defaultLocale) {
         if (false) {
         }
 
@@ -997,7 +997,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             subscription = _ref.subscription,
             isFallback = _ref.isFallback,
             locale = _ref.locale,
-            locales = _ref.locales;
+            locales = _ref.locales,
+            defaultLocale = _ref.defaultLocale;
 
           _classCallCheck(this, Router);
 
@@ -1020,6 +1021,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this._shallow = void 0;
           this.locale = void 0;
           this.locales = void 0;
+          this.defaultLocale = void 0;
 
           this.onPopState = function(e) {
             var state = e.state;
@@ -1290,7 +1292,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               this.abortComponentLoad(this._inFlightRoute);
                             }
 
-                            as = addLocale(as, this.locale);
+                            as = addLocale(as, this.locale, this.defaultLocale);
                             cleanedAs = delLocale(
                               hasBasePath(as) ? delBasePath(as) : as,
                               this.locale
@@ -1538,7 +1540,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             this.changeState(
                               method,
                               url,
-                              addLocale(as, this.locale),
+                              addLocale(as, this.locale, this.defaultLocale),
                               options
                             );
 
@@ -1877,7 +1879,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 }),
                                 delBasePath(as),
                                 __N_SSG,
-                                this.locale
+                                this.locale,
+                                this.defaultLocale
                               );
                             }
 
@@ -2123,7 +2126,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             _context4.next = 14;
                             return Promise.all([
-                              this.pageLoader.prefetchData(url, asPath),
+                              this.pageLoader.prefetchData(
+                                url,
+                                asPath,
+                                this.locale,
+                                this.defaultLocale
+                              ),
                               this.pageLoader[
                                 options.priority ? "loadPage" : "prefetch"
                               ](route)
@@ -3569,7 +3577,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         "isFallback",
         "basePath",
         "locale",
-        "locales"
+        "locales",
+        "defaultLocale"
       ];
       var routerEvents = [
         "routeChangeStart",
Diff for main-8f15139..06.module.js
@@ -271,7 +271,8 @@
         dynamicIds,
         isFallback,
         head: initialHeadData,
-        locales
+        locales,
+        defaultLocale
       } = data;
       var { locale } = data;
       var prefix = assetPrefix || ""; // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time
@@ -490,7 +491,8 @@
               });
             },
             locale,
-            locales
+            locales,
+            defaultLocale
           }
         ); // call init-client middleware
 
@@ -1408,7 +1410,7 @@
          * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
          */
 
-        getDataHref(href, asPath, ssg, locale) {
+        getDataHref(href, asPath, ssg, locale, defaultLocale) {
           var { pathname: hrefPathname, query, search } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
           var { pathname: asPathname } = (0,
@@ -1418,7 +1420,8 @@
           var getHrefForSlug = path => {
             var dataRoute = (0, _router.addLocale)(
               (0, _getAssetPathFromRoute.default)(path, ".json"),
-              locale
+              locale,
+              defaultLocale
             );
             return (0, _router.addBasePath)(
               "/_next/data/"
@@ -1441,7 +1444,7 @@
          * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
          */
 
-        prefetchData(href, asPath) {
+        prefetchData(href, asPath, locale, defaultLocale) {
           var { pathname: hrefPathname } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
           var route = normalizeRoute(hrefPathname);
@@ -1451,7 +1454,13 @@
               _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)) && // noop when data has already been prefetched (dedupe)
+              (_dataHref = this.getDataHref(
+                href,
+                asPath,
+                true,
+                locale,
+                defaultLocale
+              )) && // noop when data has already been prefetched (dedupe)
               !document.querySelector(
                 'link[rel="'
                   .concat(relPrefetch, '"][href^="')
Diff for main-e85a0b1..a6ee0345b.js
@@ -353,7 +353,8 @@ _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,
+        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
@@ -672,7 +673,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                             });
                           },
                           locale: locale,
-                          locales: locales
+                          locales: locales,
+                          defaultLocale: defaultLocale
                         }
                       ); // call init-client middleware
 
@@ -1763,7 +1765,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           },
           {
             key: "getDataHref",
-            value: function getDataHref(href, asPath, ssg, locale) {
+            value: function getDataHref(
+              href,
+              asPath,
+              ssg,
+              locale,
+              defaultLocale
+            ) {
               var _this2 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
@@ -1779,7 +1787,8 @@ _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
+                  locale,
+                  defaultLocale
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
@@ -1805,7 +1814,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           },
           {
             key: "prefetchData",
-            value: function prefetchData(href, asPath) {
+            value: function prefetchData(href, asPath, locale, defaultLocale) {
               var _this3 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
@@ -1816,7 +1825,13 @@ _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(href, asPath, true)) && // noop when data has already been prefetched (dedupe)
+                  (_dataHref = _this3.getDataHref(
+                    href,
+                    asPath,
+                    true,
+                    locale,
+                    defaultLocale
+                  )) && // noop when data has already been prefetched (dedupe)
                   !document.querySelector(
                     'link[rel="'
                       .concat(relPrefetch, '"][href^="')
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      href="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-e85a0b19170a6ee0345b.js"
+      src="/_next/static/chunks/main-53ff02d086cacb9abd03.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      src="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -121,13 +121,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a47cb7dd0a29df91531.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.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-8f151396166789e5f006.module.js"
+      href="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/link-776abc716b587eb0f923.module.js"
+      href="/_next/static/chunks/pages/link-1de2ef9a42400a3bd1f2.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-e85a0b19170a6ee0345b.js"
+      src="/_next/static/chunks/main-53ff02d086cacb9abd03.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      src="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -126,13 +126,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a47cb7dd0a29df91531.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -150,13 +150,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-943a64e08fa49f0674ac.js"
+      src="/_next/static/chunks/pages/link-67e857671520c009f99f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-776abc716b587eb0f923.module.js"
+      src="/_next/static/chunks/pages/link-1de2ef9a42400a3bd1f2.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-8f151396166789e5f006.module.js"
+      href="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-e85a0b19170a6ee0345b.js"
+      src="/_next/static/chunks/main-53ff02d086cacb9abd03.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      src="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -121,13 +121,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a47cb7dd0a29df91531.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
buildDuration 12.1s 12.1s -28ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +7.47 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..977d.js gzip 11 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-6f0de25..2754.js gzip 7.21 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..9b19.js gzip N/A 11.1 kB N/A
main-310f69a..b28a.js gzip N/A 7.23 kB N/A
Overall change 58 kB 58 kB ⚠️ +49 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..dule.js gzip 6.87 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-9ee6725..dule.js gzip 6.27 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.9 kB N/A
main-fbbf49e..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +38 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-537beac..0f9a.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-409b283..e3ab.js gzip N/A 1.32 kB N/A
Overall change 7.72 kB 7.73 kB ⚠️ +6 B
Client Pages Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-02f45f5..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-92d3016..dule.js gzip N/A 1.28 kB N/A
Overall change 5.37 kB 5.37 kB ⚠️ +4 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 330 B 329 B -1 B
Overall change 653 B 652 B -1 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
_error.js 1.05 MB 1.05 MB ⚠️ +173 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +173 B
link.js 1.1 MB 1.1 MB ⚠️ +382 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +350 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +350 B
Overall change 5.41 MB 5.41 MB ⚠️ +1.43 kB
Commit: 552fc6d

@ijjk ijjk marked this pull request as ready for review October 8, 2020 02:11
@ijjk
Copy link
Member Author

ijjk commented Oct 8, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
buildDuration 12.9s 12.6s -227ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +7.47 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
/ failed reqs 0 0
/ total time (seconds) 2.347 2.369 ⚠️ +0.02
/ avg req/sec 1065.31 1055.39 ⚠️ -9.92
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.3 1.333 ⚠️ +0.03
/error-in-render avg req/sec 1922.88 1875.64 ⚠️ -47.24
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..977d.js gzip 11 kB 11.1 kB ⚠️ +26 B
framework.HASH.js gzip 39 kB 39 kB
main-6f0de25..2754.js gzip 7.21 kB 7.23 kB ⚠️ +23 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58 kB ⚠️ +49 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..dule.js gzip 6.87 kB 6.9 kB ⚠️ +25 B
framework.HA..dule.js gzip 39 kB 39 kB
main-9ee6725..dule.js gzip 6.27 kB 6.29 kB ⚠️ +13 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +38 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-537beac..0f9a.js gzip 1.32 kB 1.32 kB ⚠️ +6 B
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.72 kB 7.73 kB ⚠️ +6 B
Client Pages Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-02f45f5..dule.js gzip 1.28 kB 1.28 kB ⚠️ +4 B
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB ⚠️ +4 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 330 B 329 B -1 B
Overall change 653 B 652 B -1 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
index.html gzip 1 kB 1 kB ⚠️ +2 B
link.html gzip 1.01 kB 1.01 kB ⚠️ +2 B
withRouter.html gzip 994 B 996 B ⚠️ +2 B
Overall change 3 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-943a64e08fa49f0674ac.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-67e857671520c009f99f.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-776abc716b587eb0f923.module.js"
+    "static\u002Fchunks\u002Fpages\u002Flink-1de2ef9a42400a3bd1f2.module.js"
   ],
   "/routerDirect": [
     "static\u002Fchunks\u002Fpages\u002FrouterDirect-368af3dfef3c9cd99dc3.module.js"
Diff for link-776abc7..23.module.js
@@ -293,7 +293,11 @@
           (child.type === "a" && !("href" in child.props))
         ) {
           childProps.href = (0, _router.addBasePath)(
-            (0, _router.addLocale)(as, router && router.locale)
+            (0, _router.addLocale)(
+              as,
+              router && router.locale,
+              router && router.defaultLocale
+            )
           );
         }
Diff for link-943a64e..49f0674ac.js
@@ -312,7 +312,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           (child.type === "a" && !("href" in child.props))
         ) {
           childProps.href = (0, _router.addBasePath)(
-            (0, _router.addLocale)(as, router && router.locale)
+            (0, _router.addLocale)(
+              as,
+              router && router.locale,
+              router && router.defaultLocale
+            )
           );
         }
Diff for 677f882d2ed8..9d.module.js
@@ -615,7 +615,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           : path;
       }
 
-      function addLocale(path, locale) {
+      function addLocale(path, locale, defaultLocale) {
         if (false) {
         }
 
@@ -850,7 +850,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             subscription,
             isFallback,
             locale,
-            locales
+            locales,
+            defaultLocale
           } = _ref;
           this.route = void 0;
           this.pathname = void 0;
@@ -871,6 +872,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this._shallow = void 0;
           this.locale = void 0;
           this.locales = void 0;
+          this.defaultLocale = void 0;
 
           this.onPopState = e => {
             var state = e.state;
@@ -1070,7 +1072,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             this.abortComponentLoad(this._inFlightRoute);
           }
 
-          as = addLocale(as, this.locale);
+          as = addLocale(as, this.locale, this.defaultLocale);
           var cleanedAs = delLocale(
             hasBasePath(as) ? delBasePath(as) : as,
             this.locale
@@ -1235,7 +1237,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             }
 
             Router.events.emit("beforeHistoryChange", as);
-            this.changeState(method, url, addLocale(as, this.locale), options);
+            this.changeState(
+              method,
+              url,
+              addLocale(as, this.locale, this.defaultLocale),
+              options
+            );
 
             if (false) {
               var appComp;
@@ -1383,7 +1390,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 }),
                 delBasePath(as),
                 __N_SSG,
-                this.locale
+                this.locale,
+                this.defaultLocale
               );
             }
 
@@ -1537,7 +1545,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             pathname
           );
           await Promise.all([
-            this.pageLoader.prefetchData(url, asPath),
+            this.pageLoader.prefetchData(
+              url,
+              asPath,
+              this.locale,
+              this.defaultLocale
+            ),
             this.pageLoader[options.priority ? "loadPage" : "prefetch"](route)
           ]);
         }
@@ -1931,7 +1944,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         "isFallback",
         "basePath",
         "locale",
-        "locales"
+        "locales",
+        "defaultLocale"
       ];
       var routerEvents = [
         "routeChangeStart",
Diff for 677f882d2ed8..29df91531.js
@@ -754,7 +754,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           : path;
       }
 
-      function addLocale(path, locale) {
+      function addLocale(path, locale, defaultLocale) {
         if (false) {
         }
 
@@ -997,7 +997,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
             subscription = _ref.subscription,
             isFallback = _ref.isFallback,
             locale = _ref.locale,
-            locales = _ref.locales;
+            locales = _ref.locales,
+            defaultLocale = _ref.defaultLocale;
 
           _classCallCheck(this, Router);
 
@@ -1020,6 +1021,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
           this._shallow = void 0;
           this.locale = void 0;
           this.locales = void 0;
+          this.defaultLocale = void 0;
 
           this.onPopState = function(e) {
             var state = e.state;
@@ -1290,7 +1292,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                               this.abortComponentLoad(this._inFlightRoute);
                             }
 
-                            as = addLocale(as, this.locale);
+                            as = addLocale(as, this.locale, this.defaultLocale);
                             cleanedAs = delLocale(
                               hasBasePath(as) ? delBasePath(as) : as,
                               this.locale
@@ -1538,7 +1540,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             this.changeState(
                               method,
                               url,
-                              addLocale(as, this.locale),
+                              addLocale(as, this.locale, this.defaultLocale),
                               options
                             );
 
@@ -1877,7 +1879,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                 }),
                                 delBasePath(as),
                                 __N_SSG,
-                                this.locale
+                                this.locale,
+                                this.defaultLocale
                               );
                             }
 
@@ -2123,7 +2126,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                             );
                             _context4.next = 14;
                             return Promise.all([
-                              this.pageLoader.prefetchData(url, asPath),
+                              this.pageLoader.prefetchData(
+                                url,
+                                asPath,
+                                this.locale,
+                                this.defaultLocale
+                              ),
                               this.pageLoader[
                                 options.priority ? "loadPage" : "prefetch"
                               ](route)
@@ -3569,7 +3577,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
         "isFallback",
         "basePath",
         "locale",
-        "locales"
+        "locales",
+        "defaultLocale"
       ];
       var routerEvents = [
         "routeChangeStart",
Diff for main-8f15139..06.module.js
@@ -271,7 +271,8 @@
         dynamicIds,
         isFallback,
         head: initialHeadData,
-        locales
+        locales,
+        defaultLocale
       } = data;
       var { locale } = data;
       var prefix = assetPrefix || ""; // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time
@@ -490,7 +491,8 @@
               });
             },
             locale,
-            locales
+            locales,
+            defaultLocale
           }
         ); // call init-client middleware
 
@@ -1408,7 +1410,7 @@
          * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
          */
 
-        getDataHref(href, asPath, ssg, locale) {
+        getDataHref(href, asPath, ssg, locale, defaultLocale) {
           var { pathname: hrefPathname, query, search } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
           var { pathname: asPathname } = (0,
@@ -1418,7 +1420,8 @@
           var getHrefForSlug = path => {
             var dataRoute = (0, _router.addLocale)(
               (0, _getAssetPathFromRoute.default)(path, ".json"),
-              locale
+              locale,
+              defaultLocale
             );
             return (0, _router.addBasePath)(
               "/_next/data/"
@@ -1441,7 +1444,7 @@
          * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
          */
 
-        prefetchData(href, asPath) {
+        prefetchData(href, asPath, locale, defaultLocale) {
           var { pathname: hrefPathname } = (0,
           _parseRelativeUrl.parseRelativeUrl)(href);
           var route = normalizeRoute(hrefPathname);
@@ -1451,7 +1454,13 @@
               _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)) && // noop when data has already been prefetched (dedupe)
+              (_dataHref = this.getDataHref(
+                href,
+                asPath,
+                true,
+                locale,
+                defaultLocale
+              )) && // noop when data has already been prefetched (dedupe)
               !document.querySelector(
                 'link[rel="'
                   .concat(relPrefetch, '"][href^="')
Diff for main-e85a0b1..a6ee0345b.js
@@ -353,7 +353,8 @@ _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,
+        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
@@ -672,7 +673,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                             });
                           },
                           locale: locale,
-                          locales: locales
+                          locales: locales,
+                          defaultLocale: defaultLocale
                         }
                       ); // call init-client middleware
 
@@ -1763,7 +1765,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           },
           {
             key: "getDataHref",
-            value: function getDataHref(href, asPath, ssg, locale) {
+            value: function getDataHref(
+              href,
+              asPath,
+              ssg,
+              locale,
+              defaultLocale
+            ) {
               var _this2 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
@@ -1779,7 +1787,8 @@ _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
+                  locale,
+                  defaultLocale
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
@@ -1805,7 +1814,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           },
           {
             key: "prefetchData",
-            value: function prefetchData(href, asPath) {
+            value: function prefetchData(href, asPath, locale, defaultLocale) {
               var _this3 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
@@ -1816,7 +1825,13 @@ _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(href, asPath, true)) && // noop when data has already been prefetched (dedupe)
+                  (_dataHref = _this3.getDataHref(
+                    href,
+                    asPath,
+                    true,
+                    locale,
+                    defaultLocale
+                  )) && // noop when data has already been prefetched (dedupe)
                   !document.querySelector(
                     'link[rel="'
                       .concat(relPrefetch, '"][href^="')
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      href="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-e85a0b19170a6ee0345b.js"
+      src="/_next/static/chunks/main-53ff02d086cacb9abd03.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      src="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -121,13 +121,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a47cb7dd0a29df91531.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.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-8f151396166789e5f006.module.js"
+      href="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/link-776abc716b587eb0f923.module.js"
+      href="/_next/static/chunks/pages/link-1de2ef9a42400a3bd1f2.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-e85a0b19170a6ee0345b.js"
+      src="/_next/static/chunks/main-53ff02d086cacb9abd03.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      src="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -126,13 +126,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a47cb7dd0a29df91531.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -150,13 +150,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-943a64e08fa49f0674ac.js"
+      src="/_next/static/chunks/pages/link-67e857671520c009f99f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-776abc716b587eb0f923.module.js"
+      src="/_next/static/chunks/pages/link-1de2ef9a42400a3bd1f2.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-8f151396166789e5f006.module.js"
+      href="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-e85a0b19170a6ee0345b.js"
+      src="/_next/static/chunks/main-53ff02d086cacb9abd03.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-8f151396166789e5f006.module.js"
+      src="/_next/static/chunks/main-500620fa408ba2b80f1c.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -121,13 +121,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a47cb7dd0a29df91531.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.057c8f680371688afd9d.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d950dcaaa011f2b8e120.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
buildDuration 14.6s 14.3s -368ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +7.47 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..977d.js gzip 11 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-6f0de25..2754.js gzip 7.21 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..9b19.js gzip N/A 11.1 kB N/A
main-310f69a..b28a.js gzip N/A 7.23 kB N/A
Overall change 58 kB 58 kB ⚠️ +49 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
677f882d2ed8..dule.js gzip 6.87 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-9ee6725..dule.js gzip 6.27 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.9 kB N/A
main-fbbf49e..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +38 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-537beac..0f9a.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-409b283..e3ab.js gzip N/A 1.32 kB N/A
Overall change 7.72 kB 7.73 kB ⚠️ +6 B
Client Pages Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale 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-02f45f5..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-92d3016..dule.js gzip N/A 1.28 kB N/A
Overall change 5.37 kB 5.37 kB ⚠️ +4 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 330 B 329 B -1 B
Overall change 653 B 652 B -1 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js i18n/redirect-default-locale Change
_error.js 1.05 MB 1.05 MB ⚠️ +173 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +173 B
link.js 1.1 MB 1.1 MB ⚠️ +382 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +350 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +350 B
Overall change 5.41 MB 5.41 MB ⚠️ +1.43 kB
Commit: cab80be

@kodiakhq kodiakhq bot merged commit bbc1a21 into vercel:canary Oct 8, 2020
@ijjk ijjk deleted the i18n/redirect-default-locale branch October 8, 2020 23:42
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
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.

None yet

2 participants