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

Fix prerendered nested index handling #14383

Merged
merged 18 commits into from
Jun 23, 2020
Merged

Conversation

Janpot
Copy link
Contributor

@Janpot Janpot commented Jun 20, 2020

Noticed this while reviewing #14376. After having done #13699, this code didn't feel right to me:

function prepareRoute(path: string) {
  path = delBasePath(path || '')
  // this /index rewrite is problematic, it makes pages/index.js 
  // and pages/index/index.js point to the same thing:
  return toRoute(!path || path === '/' ? '/index' : path)
}

Added a nested index page to the prerender tests and found it was rendering the / route on navigation. This uncovered 2 more places around the dataroute where the index path was not translated correctly.

edit:

Just to note that there was nothing wrong with #14376, the issue was already there, I just noticed it while reading that PR

@ijjk
Copy link
Member

ijjk commented Jun 20, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 10.3s 10.5s ⚠️ +225ms
nodeModulesSize 67 MB 67 MB -160 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 1.835 1.76 -0.07
/ avg req/sec 1362.58 1420.27 ⚠️ +57.69
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.067 1.055 -0.01
/error-in-render avg req/sec 2344.07 2369.43 ⚠️ +25.36
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB 10.5 kB -10 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.9 kB 56.9 kB -10 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.6 kB
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB 6.91 kB -11 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.4 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 955 B 955 B
link.html gzip 961 B 961 B
withRouter.html gzip 948 B 949 B ⚠️ +1 B
Overall change 2.86 kB 2.87 kB ⚠️ +1 B

Diffs

Diff for de003c3a9d30..edb6832d1.js
@@ -751,8 +751,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "/"));
       }
 
       function prepareUrlAs(url, as) {
Diff for de003c3a9d30..a9.module.js
@@ -623,8 +623,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "/"));
       }
 
       function prepareUrlAs(url, as) {
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.4c58437d6282f47599f4.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.42c916394cb03c1ec467.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.4c58437d6282f47599f4.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.4c58437d6282f47599f4.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.42c916394cb03c1ec467.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.4c58437d6282f47599f4.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.4c58437d6282f47599f4.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.42c916394cb03c1ec467.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.4c58437d6282f47599f4.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11.3s 11.1s -159ms
nodeModulesSize 67 MB 67 MB -160 B
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
de003c3a9d30..662f.js gzip N/A 10.5 kB N/A
Overall change 56.9 kB 56.9 kB -10 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.6 kB
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
de003c3a9d30..dule.js gzip N/A 6.91 kB N/A
Overall change 52.4 kB 52.4 kB -11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 914 kB -49 B
routerDirect.js 906 kB 906 kB -49 B
withRouter.js 906 kB 906 kB -49 B
Overall change 4.48 MB 4.48 MB -147 B
Commit: 717b023

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jun 20, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11.6s 11.6s ⚠️ +37ms
nodeModulesSize 67 MB 67 MB ⚠️ +590 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 1.964 2.003 ⚠️ +0.04
/ avg req/sec 1272.61 1247.93 -24.68
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.236 1.175 -0.06
/error-in-render avg req/sec 2022.96 2127.85 ⚠️ +104.89
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -25 B
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB 10.6 kB ⚠️ +51 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.9 kB 57 kB ⚠️ +26 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -30 B
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB 6.97 kB ⚠️ +51 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.4 kB ⚠️ +21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 955 B 954 B -1 B
link.html gzip 961 B 960 B -1 B
withRouter.html gzip 948 B 947 B -1 B
Overall change 2.86 kB 2.86 kB -3 B

Diffs

Diff for de003c3a9d30..edb6832d1.js
@@ -646,6 +646,23 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+
+      function getPageAssetPath(route) {
+        return route === "/"
+          ? "/index"
+          : /^\/index(\/|$)/.test(route)
+          ? "/index".concat(route)
+          : "".concat(route);
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -726,6 +743,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -751,8 +770,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -779,7 +797,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname), ".json")
               ),
               query: query
             }),
Diff for de003c3a9d30..a9.module.js
@@ -526,6 +526,23 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+
+      function getPageAssetPath(route) {
+        return route === "/"
+          ? "/index"
+          : /^\/index(\/|$)/.test(route)
+          ? "/index".concat(route)
+          : "".concat(route);
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -598,6 +615,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -623,8 +642,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -651,7 +669,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname), ".json")
               ),
               query
             }),
Diff for main-HASH.js
@@ -1432,7 +1432,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1445,6 +1444,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1478,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1578,7 +1571,7 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _assetPath.getPageAssetPath)(path);
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
Diff for main-HASH.module.js
@@ -1073,7 +1073,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1086,6 +1085,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1119,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1203,7 +1196,7 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _assetPath.getPageAssetPath)(path);
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-f7ca964efda7e88fd517.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.35531e0bd8c50efe0031.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-f7ca964efda7e88fd517.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.35531e0bd8c50efe0031.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-f7ca964efda7e88fd517.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.35531e0bd8c50efe0031.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 12.6s 12.6s ⚠️ +20ms
nodeModulesSize 67 MB 67 MB ⚠️ +590 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -25 B
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
de003c3a9d30..8735.js gzip N/A 10.6 kB N/A
Overall change 56.9 kB 57 kB ⚠️ +26 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -30 B
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
de003c3a9d30..dule.js gzip N/A 6.97 kB N/A
Overall change 52.4 kB 52.4 kB ⚠️ +21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 914 kB ⚠️ +345 B
routerDirect.js 906 kB 907 kB ⚠️ +345 B
withRouter.js 906 kB 907 kB ⚠️ +345 B
Overall change 4.48 MB 4.49 MB ⚠️ +1.03 kB
Commit: 22885b5

@Janpot Janpot changed the title [wip] remove unnecessary path rewriting Fix prerendered nested index handling Jun 20, 2020
@ijjk
Copy link
Member

ijjk commented Jun 20, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11s 10.9s -127ms
nodeModulesSize 67 MB 67 MB ⚠️ +679 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 1.823 1.882 ⚠️ +0.06
/ avg req/sec 1371.68 1328.63 -43.05
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.126 1.117 -0.01
/error-in-render avg req/sec 2220.48 2238.42 ⚠️ +17.94
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -25 B
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB 10.6 kB ⚠️ +51 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.9 kB 57 kB ⚠️ +26 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -30 B
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB 6.97 kB ⚠️ +51 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.4 kB ⚠️ +21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 955 B 954 B -1 B
link.html gzip 961 B 960 B -1 B
withRouter.html gzip 948 B 947 B -1 B
Overall change 2.86 kB 2.86 kB -3 B

Diffs

Diff for de003c3a9d30..edb6832d1.js
@@ -646,6 +646,23 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+
+      function getPageAssetPath(route) {
+        return route === "/"
+          ? "/index"
+          : /^\/index(\/|$)/.test(route)
+          ? "/index".concat(route)
+          : "".concat(route);
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -726,6 +743,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -751,8 +770,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -779,7 +797,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname), ".json")
               ),
               query: query
             }),
Diff for de003c3a9d30..a9.module.js
@@ -526,6 +526,23 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+
+      function getPageAssetPath(route) {
+        return route === "/"
+          ? "/index"
+          : /^\/index(\/|$)/.test(route)
+          ? "/index".concat(route)
+          : "".concat(route);
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -598,6 +615,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -623,8 +642,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -651,7 +669,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname), ".json")
               ),
               query
             }),
Diff for main-HASH.js
@@ -1432,7 +1432,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1445,6 +1444,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1478,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1578,7 +1571,7 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _assetPath.getPageAssetPath)(path);
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
Diff for main-HASH.module.js
@@ -1073,7 +1073,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1086,6 +1085,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1119,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1203,7 +1196,7 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _assetPath.getPageAssetPath)(path);
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-f7ca964efda7e88fd517.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.35531e0bd8c50efe0031.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-f7ca964efda7e88fd517.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.35531e0bd8c50efe0031.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-f7ca964efda7e88fd517.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-276c3bc53de7946cf810.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.35531e0bd8c50efe0031.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f3575c35870e8e4c1b88.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11.7s 11.9s ⚠️ +200ms
nodeModulesSize 67 MB 67 MB ⚠️ +679 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -25 B
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
de003c3a9d30..8735.js gzip N/A 10.6 kB N/A
Overall change 56.9 kB 57 kB ⚠️ +26 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -30 B
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
de003c3a9d30..dule.js gzip N/A 6.97 kB N/A
Overall change 52.4 kB 52.4 kB ⚠️ +21 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 914 kB ⚠️ +345 B
routerDirect.js 906 kB 907 kB ⚠️ +345 B
withRouter.js 906 kB 907 kB ⚠️ +345 B
Overall change 4.48 MB 4.49 MB ⚠️ +1.03 kB
Commit: 9bf7252

@ijjk
Copy link
Member

ijjk commented Jun 20, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 13s 13.3s ⚠️ +287ms
nodeModulesSize 67 MB 67 MB ⚠️ +2.36 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 2.211 2.318 ⚠️ +0.11
/ avg req/sec 1130.85 1078.74 -52.11
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.45 1.606 ⚠️ +0.16
/error-in-render avg req/sec 1723.82 1557.05 -166.77
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -26 B
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB 10.7 kB ⚠️ +113 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.9 kB 57 kB ⚠️ +87 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -29 B
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB 7.03 kB ⚠️ +113 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.5 kB ⚠️ +84 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 955 B 951 B -4 B
link.html gzip 961 B 958 B -3 B
withRouter.html gzip 948 B 944 B -4 B
Overall change 2.86 kB 2.85 kB -11 B

Diffs

Diff for de003c3a9d30..edb6832d1.js
@@ -646,6 +646,49 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+      exports.getAssetPagePath = getAssetPagePath;
+
+      function getPageAssetPath(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      function getAssetPagePath(assetPath) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        assetPath =
+          ext && assetPath.endsWith(ext)
+            ? assetPath.slice(0, -ext.length)
+            : assetPath;
+
+        if (assetPath.startsWith("/index/")) {
+          assetPath = assetPath.slice(6);
+        } else if (assetPath === "/index") {
+          assetPath = "/";
+        }
+
+        return assetPath;
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -726,6 +769,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -751,8 +796,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -779,7 +823,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname, ".json"))
               ),
               query: query
             }),
Diff for de003c3a9d30..a9.module.js
@@ -526,6 +526,49 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+      exports.getAssetPagePath = getAssetPagePath;
+
+      function getPageAssetPath(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      function getAssetPagePath(assetPath) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        assetPath =
+          ext && assetPath.endsWith(ext)
+            ? assetPath.slice(0, -ext.length)
+            : assetPath;
+
+        if (assetPath.startsWith("/index/")) {
+          assetPath = assetPath.slice(6);
+        } else if (assetPath === "/index") {
+          assetPath = "/";
+        }
+
+        return assetPath;
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -598,6 +641,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -623,8 +668,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -651,7 +695,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname, ".json"))
               ),
               query
             }),
Diff for main-HASH.js
@@ -1432,7 +1432,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1445,6 +1444,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1478,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1578,11 +1571,14 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _assetPath.getPageAssetPath)(
+                    path,
+                    ".json"
+                  );
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
-                    .concat(dataRoute, ".json");
+                    .concat(dataRoute);
                 };
 
               var _ref = (0, _url.parse)(href, true),
@@ -1825,7 +1821,7 @@
                 url = route;
               } else {
                 if (false) {
-                  var ext, scriptRoute;
+                  var scriptRoute, ext;
                 }
               }
Diff for main-HASH.module.js
@@ -1073,7 +1073,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1086,6 +1085,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1119,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1203,11 +1196,11 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _assetPath.getPageAssetPath)(path, ".json");
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
-                .concat(dataRoute, ".json");
+                .concat(dataRoute);
             };
 
           var { pathname: hrefPathname, query } = (0, _url.parse)(href, true);
@@ -1412,7 +1405,7 @@
             url = route;
           } else {
             if (false) {
-              var ext, scriptRoute;
+              var scriptRoute, ext;
             }
           }
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-bdde9b04d2961e1c4a2d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.477326b69d8c0f66ec29.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-9083723ab89d7fbb9a06.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-bdde9b04d2961e1c4a2d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9e2b2c4b825eb560adb.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.477326b69d8c0f66ec29.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-bdde9b04d2961e1c4a2d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.477326b69d8c0f66ec29.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-9083723ab89d7fbb9a06.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-bdde9b04d2961e1c4a2d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9e2b2c4b825eb560adb.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.477326b69d8c0f66ec29.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      href="/_next/static/runtime/main-bdde9b04d2961e1c4a2d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.477326b69d8c0f66ec29.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-eaf5488e20ec921d713f.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-d371df75a64e2540b042.js"
+      src="/_next/static/runtime/main-9083723ab89d7fbb9a06.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-59c45a8be830c5f95780.module.js"
+      src="/_next/static/runtime/main-bdde9b04d2961e1c4a2d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9e2b2c4b825eb560adb.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.477326b69d8c0f66ec29.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 14.3s 14.1s -164ms
nodeModulesSize 67 MB 67 MB ⚠️ +2.36 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -26 B
webpack-HASH.js gzip 746 B 746 B
de003c3a9d30..75a9.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
de003c3a9d30..9d09.js gzip N/A 10.7 kB N/A
Overall change 56.9 kB 57 kB ⚠️ +87 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -29 B
webpack-HASH..dule.js gzip 746 B 746 B
de003c3a9d30..dule.js gzip 6.92 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
de003c3a9d30..dule.js gzip N/A 7.03 kB N/A
Overall change 52.4 kB 52.5 kB ⚠️ +84 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Pages
vercel/next.js canary Janpot/next.js wip-remove-index Change
routerDirect.js gzip 279 B 279 B
withRouter.js gzip 278 B 278 B
_error.js gzip 3.37 kB 3.37 kB
index.js gzip 222 B 222 B
link.js gzip 2.05 kB 2.05 kB
hooks.js gzip 881 B 881 B
_app.js gzip 1.26 kB 1.26 kB
Overall change 8.34 kB 8.34 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.module.js gzip 223 B 223 B
routerDirect..dule.js gzip 281 B 281 B
withRouter.m..dule.js gzip 278 B 278 B
hooks.module.js gzip 383 B 383 B
_error.module.js gzip 2.21 kB 2.21 kB
link.module.js gzip 1.52 kB 1.52 kB
_app.module.js gzip 604 B 604 B
Overall change 5.49 kB 5.49 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 270 B 270 B
_buildManife..dule.js gzip 274 B 274 B
Overall change 544 B 544 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 915 kB ⚠️ +738 B
routerDirect.js 906 kB 907 kB ⚠️ +738 B
withRouter.js 906 kB 907 kB ⚠️ +738 B
Overall change 4.48 MB 4.49 MB ⚠️ +2.21 kB
Commit: 18befd8

@ijjk
Copy link
Member

ijjk commented Jun 20, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11.9s 11.8s -40ms
nodeModulesSize 67 MB 67 MB ⚠️ +2.52 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 1.978 1.946 -0.03
/ avg req/sec 1263.77 1284.4 ⚠️ +20.63
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.206 1.188 -0.02
/error-in-render avg req/sec 2072.69 2103.5 ⚠️ +30.81
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -26 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..75a9.js gzip 10.5 kB 10.7 kB ⚠️ +119 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.9 kB 57 kB ⚠️ +93 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -29 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.92 kB 7.04 kB ⚠️ +119 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.5 kB ⚠️ +90 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 955 B 956 B ⚠️ +1 B
link.html gzip 961 B 959 B -2 B
withRouter.html gzip 948 B 949 B ⚠️ +1 B
Overall change 2.86 kB 2.86 kB

Diffs

Diff for 19b7e98f51cc..edb6832d1.js
@@ -646,6 +646,50 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+      exports.getAssetPagePath = getAssetPagePath;
+
+      function getPageAssetPath(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      function getAssetPagePath(assetPath) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        assetPath = assetPath.replace(/\\/g, "/");
+        assetPath =
+          ext && assetPath.endsWith(ext)
+            ? assetPath.slice(0, -ext.length)
+            : assetPath;
+
+        if (assetPath.startsWith("/index/")) {
+          assetPath = assetPath.slice(6);
+        } else if (assetPath === "/index") {
+          assetPath = "/";
+        }
+
+        return assetPath;
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -726,6 +770,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -751,8 +797,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -779,7 +824,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname, ".json"))
               ),
               query: query
             }),
Diff for 19b7e98f51cc..a9.module.js
@@ -526,6 +526,50 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getPageAssetPath = getPageAssetPath;
+      exports.getAssetPagePath = getAssetPagePath;
+
+      function getPageAssetPath(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      function getAssetPagePath(assetPath) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        assetPath = assetPath.replace(/\\/g, "/");
+        assetPath =
+          ext && assetPath.endsWith(ext)
+            ? assetPath.slice(0, -ext.length)
+            : assetPath;
+
+        if (assetPath.startsWith("/index/")) {
+          assetPath = assetPath.slice(6);
+        } else if (assetPath === "/index") {
+          assetPath = "/";
+        }
+
+        return assetPath;
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -598,6 +642,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -623,8 +669,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -651,7 +696,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat((0, _assetPath.getPageAssetPath)(pathname, ".json"))
               ),
               query
             }),
Diff for main-HASH.js
@@ -1432,7 +1432,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1445,6 +1444,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1478,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1578,11 +1571,14 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _assetPath.getPageAssetPath)(
+                    path,
+                    ".json"
+                  );
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
-                    .concat(dataRoute, ".json");
+                    .concat(dataRoute);
                 };
 
               var _ref = (0, _url.parse)(href, true),
@@ -1825,7 +1821,7 @@
                 url = route;
               } else {
                 if (false) {
-                  var ext, scriptRoute;
+                  var scriptRoute, ext;
                 }
               }
Diff for main-HASH.module.js
@@ -1073,7 +1073,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1086,6 +1085,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1119,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1203,11 +1196,11 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _assetPath.getPageAssetPath)(path, ".json");
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
-                .concat(dataRoute, ".json");
+                .concat(dataRoute);
             };
 
           var { pathname: hrefPathname, query } = (0, _url.parse)(href, true);
@@ -1412,7 +1405,7 @@
             url = route;
           } else {
             if (false) {
-              var ext, scriptRoute;
+              var scriptRoute, ext;
             }
           }
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      href="/_next/static/runtime/main-0d43dda5ba3a1c3fa707.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6c539668440bdeff983f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-76c97d70fdb8ec3ca87e.js"
+      src="/_next/static/runtime/main-574cba65670334e283b3.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      src="/_next/static/runtime/main-0d43dda5ba3a1c3fa707.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c5746d5a037deaae6fba.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6c539668440bdeff983f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      href="/_next/static/runtime/main-0d43dda5ba3a1c3fa707.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6c539668440bdeff983f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-76c97d70fdb8ec3ca87e.js"
+      src="/_next/static/runtime/main-574cba65670334e283b3.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      src="/_next/static/runtime/main-0d43dda5ba3a1c3fa707.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c5746d5a037deaae6fba.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6c539668440bdeff983f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      href="/_next/static/runtime/main-0d43dda5ba3a1c3fa707.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6c539668440bdeff983f.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-76c97d70fdb8ec3ca87e.js"
+      src="/_next/static/runtime/main-574cba65670334e283b3.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      src="/_next/static/runtime/main-0d43dda5ba3a1c3fa707.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c5746d5a037deaae6fba.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6c539668440bdeff983f.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 12.8s 12.9s ⚠️ +113ms
nodeModulesSize 67 MB 67 MB ⚠️ +2.52 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -26 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..75a9.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..bacf.js gzip N/A 10.7 kB N/A
Overall change 56.9 kB 57 kB ⚠️ +93 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.57 kB -29 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.92 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 7.04 kB N/A
Overall change 52.4 kB 52.5 kB ⚠️ +90 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 914 kB ⚠️ +783 B
routerDirect.js 906 kB 907 kB ⚠️ +783 B
withRouter.js 906 kB 907 kB ⚠️ +783 B
Overall change 4.48 MB 4.49 MB ⚠️ +2.35 kB
Commit: c93564a

@ijjk
Copy link
Member

ijjk commented Jun 21, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11.9s 12.4s ⚠️ +487ms
nodeModulesSize 67 MB 67 MB ⚠️ +3.07 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 2.059 2.099 ⚠️ +0.04
/ avg req/sec 1214.27 1190.87 -23.4
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.25 1.204 -0.05
/error-in-render avg req/sec 1999.3 2076.84 ⚠️ +77.54
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -23 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..75a9.js gzip 10.5 kB 10.7 kB ⚠️ +124 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.9 kB 57 kB ⚠️ +101 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.58 kB -27 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.92 kB 7.04 kB ⚠️ +124 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.5 kB ⚠️ +97 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 955 B 955 B
link.html gzip 961 B 960 B -1 B
withRouter.html gzip 948 B 947 B -1 B
Overall change 2.86 kB 2.86 kB -2 B

Diffs

Diff for 19b7e98f51cc..edb6832d1.js
@@ -646,6 +646,51 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getAssetPathFromRoute = getAssetPathFromRoute;
+      exports.getRouteFromAssetPath = getRouteFromAssetPath; // These functions translate between a pages asset path (relative froma  common prefix)
+      // and its logical route. "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      function getRouteFromAssetPath(assetPath) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        assetPath = assetPath.replace(/\\/g, "/");
+        assetPath =
+          ext && assetPath.endsWith(ext)
+            ? assetPath.slice(0, -ext.length)
+            : assetPath;
+
+        if (assetPath.startsWith("/index/")) {
+          assetPath = assetPath.slice(6);
+        } else if (assetPath === "/index") {
+          assetPath = "/";
+        }
+
+        return assetPath;
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -726,6 +771,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -751,8 +798,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -779,7 +825,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _assetPath.getAssetPathFromRoute)(pathname, ".json")
+                  )
               ),
               query: query
             }),
Diff for 19b7e98f51cc..a9.module.js
@@ -526,6 +526,51 @@
       /***/
     },
 
+    /***/ dF3r: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.getAssetPathFromRoute = getAssetPathFromRoute;
+      exports.getRouteFromAssetPath = getRouteFromAssetPath; // These functions translate between a pages asset path (relative froma  common prefix)
+      // and its logical route. "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      function getRouteFromAssetPath(assetPath) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        assetPath = assetPath.replace(/\\/g, "/");
+        assetPath =
+          ext && assetPath.endsWith(ext)
+            ? assetPath.slice(0, -ext.length)
+            : assetPath;
+
+        if (assetPath.startsWith("/index/")) {
+          assetPath = assetPath.slice(6);
+        } else if (assetPath === "/index") {
+          assetPath = "/";
+        }
+
+        return assetPath;
+      }
+
+      /***/
+    },
+
     /***/ dZ6Y: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -598,6 +643,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -623,8 +670,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -651,7 +697,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _assetPath.getAssetPathFromRoute)(pathname, ".json")
+                  )
               ),
               query
             }),
Diff for main-HASH.js
@@ -1432,7 +1432,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1445,6 +1444,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1478,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1578,11 +1571,14 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _assetPath.getAssetPathFromRoute)(
+                    path,
+                    ".json"
+                  );
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
-                    .concat(dataRoute, ".json");
+                    .concat(dataRoute);
                 };
 
               var _ref = (0, _url.parse)(href, true),
@@ -1825,7 +1821,7 @@
                 url = route;
               } else {
                 if (false) {
-                  var ext, scriptRoute;
+                  var scriptRoute, ext;
                 }
               }
Diff for main-HASH.module.js
@@ -1073,7 +1073,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1086,6 +1085,8 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _assetPath = __webpack_require__("dF3r");
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1119,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1203,11 +1196,14 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _assetPath.getAssetPathFromRoute)(
+                path,
+                ".json"
+              );
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
-                .concat(dataRoute, ".json");
+                .concat(dataRoute);
             };
 
           var { pathname: hrefPathname, query } = (0, _url.parse)(href, true);
@@ -1412,7 +1408,7 @@
             url = route;
           } else {
             if (false) {
-              var ext, scriptRoute;
+              var scriptRoute, ext;
             }
           }
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      href="/_next/static/runtime/main-e0762c2708da5f564549.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c1b3acc1017524fc2441.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-76c97d70fdb8ec3ca87e.js"
+      src="/_next/static/runtime/main-fb0a3e3bbeca7e99524b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      src="/_next/static/runtime/main-e0762c2708da5f564549.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.1efedb837891b64b96f8.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c1b3acc1017524fc2441.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      href="/_next/static/runtime/main-e0762c2708da5f564549.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c1b3acc1017524fc2441.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-76c97d70fdb8ec3ca87e.js"
+      src="/_next/static/runtime/main-fb0a3e3bbeca7e99524b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      src="/_next/static/runtime/main-e0762c2708da5f564549.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.1efedb837891b64b96f8.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c1b3acc1017524fc2441.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      href="/_next/static/runtime/main-e0762c2708da5f564549.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c1b3acc1017524fc2441.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-76c97d70fdb8ec3ca87e.js"
+      src="/_next/static/runtime/main-fb0a3e3bbeca7e99524b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-cd53b7f04c623d12e151.module.js"
+      src="/_next/static/runtime/main-e0762c2708da5f564549.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.23a257d02f3edb6832d1.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.1efedb837891b64b96f8.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.6b23cf48f915c17ee2a9.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.c1b3acc1017524fc2441.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 13.2s 13.3s ⚠️ +80ms
nodeModulesSize 67 MB 67 MB ⚠️ +3.07 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.51 kB 6.49 kB -23 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..75a9.js gzip 10.5 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..ffe1.js gzip N/A 10.7 kB N/A
Overall change 56.9 kB 57 kB ⚠️ +101 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.6 kB 5.58 kB -27 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.92 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 7.04 kB N/A
Overall change 52.4 kB 52.5 kB ⚠️ +97 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 915 kB ⚠️ +1 kB
routerDirect.js 906 kB 907 kB ⚠️ +1 kB
withRouter.js 906 kB 907 kB ⚠️ +1 kB
Overall change 4.48 MB 4.49 MB ⚠️ +3.01 kB
Commit: 3e06c96

@Janpot Janpot marked this pull request as ready for review June 21, 2020 05:47
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jun 23, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 11.4s 11.3s -162ms
nodeModulesSize 67.1 MB 67.1 MB ⚠️ +4.01 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 1.902 1.898 0
/ avg req/sec 1314.21 1317.06 ⚠️ +2.85
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.14 1.194 ⚠️ +0.05
/error-in-render avg req/sec 2192.83 2093.7 -99.13
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.52 kB 6.49 kB -31 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..62e5.js gzip 10.6 kB 10.6 kB ⚠️ +56 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57 kB 57 kB ⚠️ +25 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.61 kB 5.57 kB -35 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.93 kB 6.99 kB ⚠️ +53 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.4 kB ⚠️ +18 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 956 B 953 B -3 B
link.html gzip 961 B 957 B -4 B
withRouter.html gzip 948 B 945 B -3 B
Overall change 2.87 kB 2.85 kB -10 B

Diffs

Diff for 19b7e98f51cc..96.module.js
@@ -216,6 +216,30 @@
       /***/
     },
 
+    /***/ Lab5: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.default = getAssetPathFromRoute; // Translates a logical route into its pages asset path (relative from a common prefix)
+      // "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      /***/
+    },
+
     /***/ Qetd: /***/ function(module, exports, __webpack_require__) {
       "use strict";
       var assign = Object.assign.bind(Object);
@@ -607,6 +631,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -632,8 +660,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -660,7 +687,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _getAssetPathFromRoute.default)(pathname, ".json")
+                  )
               ),
               query
             }),
Diff for 19b7e98f51cc..8bf3c44ba.js
@@ -239,6 +239,30 @@
       /***/
     },
 
+    /***/ Lab5: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports["default"] = getAssetPathFromRoute; // Translates a logical route into its pages asset path (relative from a common prefix)
+      // "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      /***/
+    },
+
     /***/ Qetd: /***/ function(module, exports, __webpack_require__) {
       "use strict";
       var assign = Object.assign.bind(Object);
@@ -737,6 +761,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -762,8 +790,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -790,7 +817,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _getAssetPathFromRoute["default"])(pathname, ".json")
+                  )
               ),
               query: query
             }),
Diff for main-HASH.js
@@ -1430,7 +1430,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1443,6 +1442,10 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1476,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1576,11 +1571,14 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _getAssetPathFromRoute["default"])(
+                    path,
+                    ".json"
+                  );
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
-                    .concat(dataRoute, ".json");
+                    .concat(dataRoute);
                 };
 
               var _ref = (0, _url.parse)(href, true),
@@ -1833,7 +1831,7 @@
                 url = route;
               } else {
                 if (false) {
-                  var ext, scriptRoute;
+                  var scriptRoute, ext;
                 }
               }
Diff for main-HASH.module.js
@@ -1071,7 +1071,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1084,6 +1083,10 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1117,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1201,11 +1196,14 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _getAssetPathFromRoute.default)(
+                path,
+                ".json"
+              );
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
-                .concat(dataRoute, ".json");
+                .concat(dataRoute);
             };
 
           var { pathname: hrefPathname, query } = (0, _url.parse)(href, true);
@@ -1418,7 +1416,7 @@
             url = route;
           } else {
             if (false) {
-              var ext, scriptRoute;
+              var scriptRoute, ext;
             }
           }
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 12.2s 12.2s ⚠️ +23ms
nodeModulesSize 67.1 MB 67.1 MB ⚠️ +4.01 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.52 kB 6.49 kB -31 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..62e5.js gzip 10.6 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..bcce.js gzip N/A 10.6 kB N/A
Overall change 57 kB 57 kB ⚠️ +25 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.61 kB 5.57 kB -35 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.93 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 6.99 kB N/A
Overall change 52.4 kB 52.4 kB ⚠️ +18 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 914 kB ⚠️ +589 B
routerDirect.js 906 kB 907 kB ⚠️ +589 B
withRouter.js 906 kB 907 kB ⚠️ +589 B
Overall change 4.48 MB 4.49 MB ⚠️ +1.77 kB
Commit: 7abb151

@ijjk
Copy link
Member

ijjk commented Jun 23, 2020

Failing test suites

Commit: 7abb151

test/integration/prerender/test/index.test.js

  • SSG Prerender > dev mode > should support lazy catchall route
  • SSG Prerender > dev mode > should support nested lazy catchall route
  • SSG Prerender > dev mode > should handle fallback only page correctly HTML
  • SSG Prerender > dev mode > should show error when rewriting to dynamic SSG page
  • SSG Prerender > dev mode > should always show fallback for page not in getStaticPaths
  • SSG Prerender > dev mode > should show fallback before invalid JSON is returned from getStaticProps
  • SSG Prerender > dev mode > should show error for invalid JSON returned from getStaticProps on SSR
  • SSG Prerender > dev mode > should show error for invalid JSON returned from getStaticProps on CST
  • SSG Prerender > dev mode getStaticPaths > should not cache getStaticPaths errors
  • SSG Prerender > enumlated serverless mode > should reload page on failed data request, and retry
  • SSG Prerender > enumlated serverless mode > should support lazy catchall route
  • SSG Prerender > enumlated serverless mode > should support nested lazy catchall route
  • SSG Prerender > enumlated serverless mode > outputs dataRoutes in routes-manifest correctly
  • SSG Prerender > enumlated serverless mode > outputs a prerender-manifest correctly
  • SSG Prerender > enumlated serverless mode > should call /_error GIP on 500
  • SSG Prerender > export mode > should copy prerender files and honor exportTrailingSlash
  • SSG Prerender > export mode > should navigate between pages successfully
  • SSG Prerender > production mode > should reload page on failed data request, and retry
  • SSG Prerender > production mode > should support lazy catchall route
  • SSG Prerender > production mode > should support nested lazy catchall route
  • SSG Prerender > production mode > should handle fallback only page correctly HTML
  • SSG Prerender > production mode > should not show error for invalid JSON returned from getStaticProps on SSR
  • SSG Prerender > production mode > outputs dataRoutes in routes-manifest correctly
  • SSG Prerender > production mode > outputs a prerender-manifest correctly
  • SSG Prerender > serverless mode > should reload page on failed data request, and retry
  • SSG Prerender > serverless mode > should support lazy catchall route
  • SSG Prerender > serverless mode > should support nested lazy catchall route
  • SSG Prerender > serverless mode > should handle fallback only page correctly HTML
  • SSG Prerender > serverless mode > should not show error for invalid JSON returned from getStaticProps on SSR
  • SSG Prerender > serverless mode > outputs dataRoutes in routes-manifest correctly
  • SSG Prerender > serverless mode > outputs a prerender-manifest correctly
Expand output

● SSG Prerender › dev mode › should support lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: ""

  493 |     const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths')
  494 |     const $ = cheerio.load(html)
> 495 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  496 | 
  497 |     // hydration
  498 |     const browser = await webdriver(appPort, '/catchall/delayby3s')

  at Object.<anonymous> (integration/prerender/test/index.test.js:495:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › dev mode › should support nested lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: ""

  514 |     )
  515 |     const $ = cheerio.load(html)
> 516 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  517 | 
  518 |     // hydration
  519 |     const browser = await webdriver(appPort, '/catchall/delayby3s/nested')

  at Object.<anonymous> (integration/prerender/test/index.test.js:516:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › dev mode › should handle fallback only page correctly HTML

NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"p"}
  (Session info: headless chrome=83.0.4103.97)

  555 |       const browser = await webdriver(appPort, '/fallback-only/first%2Fpost')
  556 | 
> 557 |       const text = await browser.elementByCss('p').text()
      |                    ^
  558 |       expect(text).toContain('hi fallback')
  559 | 
  560 |       // wait for fallback data to load

  at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15)
  at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13)
  at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26)
      at runMicrotasks (<anonymous>)
  at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17)
  at Object.<anonymous> (integration/prerender/test/index.test.js:557:20)

● SSG Prerender › dev mode › should handle fallback only page correctly HTML

thrown: "Exceeded timeout of 120000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  552 | 
  553 |   if (!isEmulatedServerless) {
> 554 |     it('should handle fallback only page correctly HTML', async () => {
      |     ^
  555 |       const browser = await webdriver(appPort, '/fallback-only/first%2Fpost')
  556 | 
  557 |       const text = await browser.elementByCss('p').text()

  at runTests (integration/prerender/test/index.test.js:554:5)
  at integration/prerender/test/index.test.js:1325:5
  at integration/prerender/test/index.test.js:1286:3
  at Object.<anonymous> (integration/prerender/test/index.test.js:1285:1)

● SSG Prerender › dev mode › should show error when rewriting to dynamic SSG page

expect(received).toContain(expected) // indexOf

Expected substring: "Rewrites don't support dynamic pages with getStaticProps yet. Using this will cause the page to fail to parse the params on the client"
Received string:    "<!DOCTYPE html><html><head><style data-next-hide-fouc=\"true\">body{display:none}</style><noscript data-next-hide-fouc=\"true\"><style>body{display:block}</style></noscript><meta charSet=\"utf-8\"/><meta name=\"viewport\" content=\"width=device-width\"/><meta name=\"next-head-count\" content=\"2\"/><link rel=\"preload\" href=\"/_next/static/runtime/main.js?ts=1592884764964\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/runtime/webpack.js?ts=1592884764964\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/pages/_app.js?ts=1592884764964\" as=\"script\"/><noscript id=\"__next_css__DO_NOT_USE__\"></noscript></head><body><div id=\"__next\"></div><script src=\"/_next/static/runtime/react-refresh.js?ts=1592884764964\"></script><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"statusCode\":500}},\"page\":\"/_error\",\"query\":{\"item\":\"16\"},\"buildId\":\"development\",\"isFallback\":false,\"err\":{\"name\":\"Error\",\"message\":\"Cannot find module for page: /blog/[post]\",\"stack\":\"Error: Cannot find module for page: /blog/[post]\\n    at pageNotFoundError (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js:1:336)\\n    at getPagePath (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js:2:82)\\n    at requirePage (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js:2:227)\\n    at loadComponents (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/load-components.js:1:771)\\n    at Object.loadStaticPaths (/home/runner/work/next.js/next.js/packages/next/dist/server/static-paths-worker.js:6:92)\\n    at execFunction (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:155:17)\\n    at execHelper (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:139:5)\\n    at execMethod (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:143:5)\\n    at process.\\u003canonymous\\u003e (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:64:7)\\n    at process.emit (events.js:315:20)\"},\"gip\":true}</script><script nomodule=\"\" src=\"/_next/static/runtime/polyfills.js?ts=1592884764964\"></script><script src=\"/_next/static/runtime/main.js?ts=1592884764964\"></script><script src=\"/_next/static/runtime/webpack.js?ts=1592884764964\"></script><script src=\"/_next/static/pages/_app.js?ts=1592884764964\"></script><script src=\"/_next/static/development/_buildManifest.js?ts=1592884764964\"></script><script src=\"/_next/static/development/_ssgManifest.js?ts=1592884764964\"></script></body></html>"

  608 |       const item = Math.round(Math.random() * 100)
  609 |       const html = await renderViaHTTP(appPort, `/some-rewrite/${item}`)
> 610 |       expect(html).toContain(
      |                    ^
  611 |         `Rewrites don't support dynamic pages with getStaticProps yet. Using this will cause the page to fail to parse the params on the client`
  612 |       )
  613 |     })

  at Object.<anonymous> (integration/prerender/test/index.test.js:610:20)
      at runMicrotasks (<anonymous>)

● SSG Prerender › dev mode › should always show fallback for page not in getStaticPaths

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  641 |       const html = await renderViaHTTP(appPort, '/blog/post-321')
  642 |       const $ = cheerio.load(html)
> 643 |       expect(JSON.parse($('#__NEXT_DATA__').text()).isFallback).toBe(true)
      |                                                                 ^
  644 | 
  645 |       // make another request to ensure it still is
  646 |       const html2 = await renderViaHTTP(appPort, '/blog/post-321')

  at Object.<anonymous> (integration/prerender/test/index.test.js:643:65)
      at runMicrotasks (<anonymous>)

● SSG Prerender › dev mode › should show fallback before invalid JSON is returned from getStaticProps

expect(received).toContain(expected) // indexOf

Expected substring: "\"isFallback\":true"
Received string:    "<!DOCTYPE html><html><head><style data-next-hide-fouc=\"true\">body{display:none}</style><noscript data-next-hide-fouc=\"true\"><style>body{display:block}</style></noscript><meta charSet=\"utf-8\"/><meta name=\"viewport\" content=\"width=device-width\"/><meta name=\"next-head-count\" content=\"2\"/><link rel=\"preload\" href=\"/_next/static/runtime/main.js?ts=1592884765281\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/runtime/webpack.js?ts=1592884765281\" as=\"script\"/><link rel=\"preload\" href=\"/_next/static/pages/_app.js?ts=1592884765281\" as=\"script\"/><noscript id=\"__next_css__DO_NOT_USE__\"></noscript></head><body><div id=\"__next\"></div><script src=\"/_next/static/runtime/react-refresh.js?ts=1592884765281\"></script><script id=\"__NEXT_DATA__\" type=\"application/json\">{\"props\":{\"pageProps\":{\"statusCode\":500}},\"page\":\"/_error\",\"query\":{},\"buildId\":\"development\",\"isFallback\":false,\"err\":{\"name\":\"Error\",\"message\":\"Cannot find module for page: /non-json/[p]\",\"stack\":\"Error: Cannot find module for page: /non-json/[p]\\n    at pageNotFoundError (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js:1:336)\\n    at getPagePath (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js:2:82)\\n    at requirePage (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js:2:227)\\n    at loadComponents (/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/load-components.js:1:771)\\n    at Object.loadStaticPaths (/home/runner/work/next.js/next.js/packages/next/dist/server/static-paths-worker.js:6:92)\\n    at execFunction (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:155:17)\\n    at execHelper (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:139:5)\\n    at execMethod (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:143:5)\\n    at process.\\u003canonymous\\u003e (/home/runner/work/next.js/next.js/node_modules/jest-worker/build/workers/processChild.js:64:7)\\n    at process.emit (events.js:315:20)\"},\"gip\":true}</script><script nomodule=\"\" src=\"/_next/static/runtime/polyfills.js?ts=1592884765281\"></script><script src=\"/_next/static/runtime/main.js?ts=1592884765281\"></script><script src=\"/_next/static/runtime/webpack.js?ts=1592884765281\"></script><script src=\"/_next/static/pages/_app.js?ts=1592884765281\"></script><script src=\"/_next/static/development/_buildManifest.js?ts=1592884765281\"></script><script src=\"/_next/static/development/_ssgManifest.js?ts=1592884765281\"></script></body></html>"

  796 |     it('should show fallback before invalid JSON is returned from getStaticProps', async () => {
  797 |       const html = await renderViaHTTP(appPort, '/non-json/foobar')
> 798 |       expect(html).toContain('"isFallback":true')
      |                    ^
  799 |     })
  800 | 
  801 |     it('should show error for invalid JSON returned from getStaticProps on SSR', async () => {

  at Object.<anonymous> (integration/prerender/test/index.test.js:798:20)
      at runMicrotasks (<anonymous>)

● SSG Prerender › dev mode › should show error for invalid JSON returned from getStaticProps on SSR

expect(received).toMatch(expected)

Expected pattern: /Failed to load static props/
Received string:  " 1 of 1 unhandled error
Server Error·
Error: Cannot find module for page: /non-json/[p]·
This error happened while generating the page. Any console logs will be displayed in the terminal window."

  809 |       // FIXME: disable this
  810 |       expect(await hasRedbox(browser)).toBe(true)
> 811 |       expect(await getRedboxHeader(browser)).toMatch(
      |                                              ^
  812 |         /Failed to load static props/
  813 |       )
  814 |     })

  at Object.<anonymous> (integration/prerender/test/index.test.js:811:46)

● SSG Prerender › dev mode › should show error for invalid JSON returned from getStaticProps on CST

expect(received).toMatch(expected)

Expected pattern: /Failed to load static props/
Received string:  " 1 of 1 unhandled error
Server Error·
Error: Cannot find module for page: /non-json/[p]·
This error happened while generating the page. Any console logs will be displayed in the terminal window."

  825 |       // FIXME: disable this
  826 |       expect(await hasRedbox(browser)).toBe(true)
> 827 |       expect(await getRedboxHeader(browser)).toMatch(
      |                                              ^
  828 |         /Failed to load static props/
  829 |       )
  830 |     })

  at Object.<anonymous> (integration/prerender/test/index.test.js:827:46)

● SSG Prerender › dev mode getStaticPaths › should not cache getStaticPaths errors

TIMED OUT: /The `fallback` key must be returned from getStaticPaths/

<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/runtime/main.js?ts=1592884942526" as="script"/><link rel="preload" href="/_next/static/runtime/webpack.js?ts=1592884942526" as="script"/><link rel="preload" href="/_next/static/pages/_app.js?ts=1592884942526" as="script"/><link rel="preload" href="/_next/static/pages/blog/%5Bpost%5D.js?ts=1592884942526" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript></head><body><div id="__next"><p>Post: <!-- -->post-1</p><span>time: <!-- -->167807.92880700063</span><div id="params">{&quot;post&quot;:&quot;post-1&quot;}</div><div id="query">{&quot;post&quot;:&quot;post-1&quot;}</div><a id="home" href="/">to home</a></div><script src="/_next/static/runtime/react-refresh.js?ts=1592884942526"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"params":{"post":"post-1"},"post":"post-1","time":167807.92880700063},"__N_SSG":true},"page":"/blog/[post]","query":{"post":"post-1"},"buildId":"development","nextExport":false,"isFallback":false,"gsp":true}</script><script nomodule="" src="/_next/static/runtime/polyfills.js?ts=1592884942526"></script><script src="/_next/static/runtime/main.js?ts=1592884942526"></script><script src="/_next/static/runtime/webpack.js?ts=1592884942526"></script><script src="/_next/static/pages/_app.js?ts=1592884942526"></script><script src="/_next/static/pages/blog/%5Bpost%5D.js?ts=1592884942526"></script><script src="/_next/static/development/_buildManifest.js?ts=1592884942526"></script><script src="/_next/static/development/_ssgManifest.js?ts=1592884942526"></script></body></html>

  373 | 
  374 |   if (hardError) {
> 375 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  376 |   }
  377 |   return false
  378 | }

  at check (lib/next-test-utils.js:375:11)
  at Object.<anonymous> (integration/prerender/test/index.test.js:1371:9)

● SSG Prerender › serverless mode › should reload page on failed data request, and retry

TIMED OUT: [object Object]

abc

  373 | 
  374 |   if (hardError) {
> 375 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  376 |   }
  377 |   return false
  378 | }

  at check (lib/next-test-utils.js:375:11)
  at Object.<anonymous> (integration/prerender/test/index.test.js:470:9)

● SSG Prerender › serverless mode › should support lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: ""

  493 |     const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths')
  494 |     const $ = cheerio.load(html)
> 495 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  496 | 
  497 |     // hydration
  498 |     const browser = await webdriver(appPort, '/catchall/delayby3s')

  at Object.<anonymous> (integration/prerender/test/index.test.js:495:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › serverless mode › should support nested lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: ""

  514 |     )
  515 |     const $ = cheerio.load(html)
> 516 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  517 | 
  518 |     // hydration
  519 |     const browser = await webdriver(appPort, '/catchall/delayby3s/nested')

  at Object.<anonymous> (integration/prerender/test/index.test.js:516:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › serverless mode › should handle fallback only page correctly HTML

NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"p"}
  (Session info: headless chrome=83.0.4103.97)

  555 |       const browser = await webdriver(appPort, '/fallback-only/first%2Fpost')
  556 | 
> 557 |       const text = await browser.elementByCss('p').text()
      |                    ^
  558 |       expect(text).toContain('hi fallback')
  559 | 
  560 |       // wait for fallback data to load

  at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15)
  at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13)
  at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26)
      at runMicrotasks (<anonymous>)
  at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17)
  at Object.<anonymous> (integration/prerender/test/index.test.js:557:20)

● SSG Prerender › serverless mode › should handle fallback only page correctly HTML

thrown: "Exceeded timeout of 120000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  552 | 
  553 |   if (!isEmulatedServerless) {
> 554 |     it('should handle fallback only page correctly HTML', async () => {
      |     ^
  555 |       const browser = await webdriver(appPort, '/fallback-only/first%2Fpost')
  556 | 
  557 |       const text = await browser.elementByCss('p').text()

  at runTests (integration/prerender/test/index.test.js:554:5)
  at integration/prerender/test/index.test.js:1448:5
  at integration/prerender/test/index.test.js:1381:3
  at Object.<anonymous> (integration/prerender/test/index.test.js:1285:1)

● SSG Prerender › serverless mode › should not show error for invalid JSON returned from getStaticProps on SSR

TIMED OUT: /hello /

404
This page could not be found.

  373 | 
  374 |   if (hardError) {
> 375 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  376 |   }
  377 |   return false
  378 | }

  at check (lib/next-test-utils.js:375:11)
  at Object.<anonymous> (integration/prerender/test/index.test.js:850:9)

● SSG Prerender › serverless mode › outputs dataRoutes in routes-manifest correctly

expect(received).toEqual(expected) // deep equality

- Expected  - 32
+ Received  + 24

@@ -1,106 +1,98 @@
  Array [
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/index.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/index.json$",
      "page": "/",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/another.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/another.json$",
      "page": "/another",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/bad-gssp.json$",
-     "page": "/bad-gssp",
-   },
-   Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/bad-ssr.json$",
-     "page": "/bad-ssr",
-   },
-   Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/blog.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/blog.json$",
      "page": "/blog",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/blog\\/([^\\/]+?)\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/blog/(?<post>[^/]+?)\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/blog\\/([^\\/]+?)\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/blog/(?<post>[^/]+?)\\.json$",
      "page": "/blog/[post]",
      "routeKeys": Object {
        "post": "post",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/blog\\/([^\\/]+?)\\/([^\\/]+?)\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/blog/(?<post>[^/]+?)/(?<comment>[^/]+?)\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/blog\\/([^\\/]+?)\\/([^\\/]+?)\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/blog/(?<post>[^/]+?)/(?<comment>[^/]+?)\\.json$",
      "page": "/blog/[post]/[comment]",
      "routeKeys": Object {
        "comment": "comment",
        "post": "post",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/catchall\\/(.+?)\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/catchall/(?<slug>.+?)\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/catchall\\/(.+?)\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/catchall/(?<slug>.+?)\\.json$",
      "page": "/catchall/[...slug]",
      "routeKeys": Object {
        "slug": "slug",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/catchall\\-explicit\\/(.+?)\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/catchall\\-explicit/(?<slug>.+?)\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/catchall\\-explicit\\/(.+?)\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/catchall\\-explicit/(?<slug>.+?)\\.json$",
      "page": "/catchall-explicit/[...slug]",
      "routeKeys": Object {
        "slug": "slug",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/catchall\\-optional(?:\\/(.+?))?\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/catchall\\-optional(?:/(?<slug>.+?))?\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/catchall\\-optional(?:\\/(.+?))?\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/catchall\\-optional(?:/(?<slug>.+?))?\\.json$",
      "page": "/catchall-optional/[[...slug]]",
      "routeKeys": Object {
        "slug": "slug",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/default-revalidate.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/default-revalidate.json$",
      "page": "/default-revalidate",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/fallback\\-only\\/([^\\/]+?)\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/fallback\\-only/(?<slug>[^/]+?)\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/fallback\\-only\\/([^\\/]+?)\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/fallback\\-only/(?<slug>[^/]+?)\\.json$",
      "page": "/fallback-only/[slug]",
      "routeKeys": Object {
        "slug": "slug",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/index\\/index.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/index\\/index.json$",
      "page": "/index",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/lang\\/([^\\/]+?)\\/about\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/lang/(?<lang>[^/]+?)/about\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/lang\\/([^\\/]+?)\\/about\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/lang/(?<lang>[^/]+?)/about\\.json$",
      "page": "/lang/[lang]/about",
      "routeKeys": Object {
        "lang": "lang",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/non\\-json\\/([^\\/]+?)\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/non\\-json/(?<p>[^/]+?)\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/non\\-json\\/([^\\/]+?)\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/non\\-json/(?<p>[^/]+?)\\.json$",
      "page": "/non-json/[p]",
      "routeKeys": Object {
        "p": "p",
      },
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/something.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/something.json$",
      "page": "/something",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/jcCfL2MLQE54dsLPLCaur\\/user\\/([^\\/]+?)\\/profile\\.json$",
-     "namedDataRouteRegex": "^/_next/data/jcCfL2MLQE54dsLPLCaur/user/(?<user>[^/]+?)/profile\\.json$",
+     "dataRouteRegex": "^\\/_next\\/data\\/tMXEM5lW351KkAhDoCCJw\\/user\\/([^\\/]+?)\\/profile\\.json$",
+     "namedDataRouteRegex": "^/_next/data/tMXEM5lW351KkAhDoCCJw/user/(?<user>[^/]+?)/profile\\.json$",
      "page": "/user/[user]/profile",
      "routeKeys": Object {
        "user": "user",
      },
    },

  867 |       }
  868 | 
> 869 |       expect(dataRoutes).toEqual([
      |                          ^
  870 |         {
  871 |           dataRouteRegex: normalizeRegEx(
  872 |             `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/index.json$`

  at Object.<anonymous> (integration/prerender/test/index.test.js:869:26)

● SSG Prerender › serverless mode › outputs a prerender-manifest correctly

ENOENT: no such file or directory, open '/home/runner/work/next.js/next.js/test/integration/prerender/.next/prerender-manifest.json'

● SSG Prerender › enumlated serverless mode › should reload page on failed data request, and retry

TIMED OUT: [object Object]

abc

  373 | 
  374 |   if (hardError) {
> 375 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  376 |   }
  377 |   return false
  378 | }

  at check (lib/next-test-utils.js:375:11)
  at Object.<anonymous> (integration/prerender/test/index.test.js:470:9)

● SSG Prerender › enumlated serverless mode › should support lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: "Hi notreturnedinpaths"

  493 |     const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths')
  494 |     const $ = cheerio.load(html)
> 495 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  496 | 
  497 |     // hydration
  498 |     const browser = await webdriver(appPort, '/catchall/delayby3s')

  at Object.<anonymous> (integration/prerender/test/index.test.js:495:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › enumlated serverless mode › should support nested lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: "Hi notreturnedinpaths nested"

  514 |     )
  515 |     const $ = cheerio.load(html)
> 516 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  517 | 
  518 |     // hydration
  519 |     const browser = await webdriver(appPort, '/catchall/delayby3s/nested')

  at Object.<anonymous> (integration/prerender/test/index.test.js:516:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › enumlated serverless mode › outputs dataRoutes in routes-manifest correctly

expect(received).toEqual(expected) // deep equality

- Expected  - 8
+ Received  + 0

@@ -6,18 +6,10 @@
    Object {
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/another.json$",
      "page": "/another",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/bad-gssp.json$",
-     "page": "/bad-gssp",
-   },
-   Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/bad-ssr.json$",
-     "page": "/bad-ssr",
-   },
-   Object {
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/blog.json$",
      "page": "/blog",
    },
    Object {
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/blog\\/([^\\/]+?)\\.json$",

  867 |       }
  868 | 
> 869 |       expect(dataRoutes).toEqual([
      |                          ^
  870 |         {
  871 |           dataRouteRegex: normalizeRegEx(
  872 |             `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/index.json$`

  at Object.<anonymous> (integration/prerender/test/index.test.js:869:26)

● SSG Prerender › enumlated serverless mode › outputs a prerender-manifest correctly

expect(received).toEqual(expected) // deep equality

- Expected  - 6
+ Received  + 6

@@ -1,16 +1,16 @@
  Object {
    "/blog/[post]": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/blog/[post].json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/blog\\/([^\\/]+?)\\.json$",
-     "fallback": "/blog/[post].html",
+     "fallback": false,
      "routeRegex": "^\\/blog\\/([^\\/]+?)(?:\\/)?$",
    },
    "/blog/[post]/[comment]": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/blog/[post]/[comment].json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/blog\\/([^\\/]+?)\\/([^\\/]+?)\\.json$",
-     "fallback": "/blog/[post]/[comment].html",
+     "fallback": false,
      "routeRegex": "^\\/blog\\/([^\\/]+?)\\/([^\\/]+?)(?:\\/)?$",
    },
    "/catchall-explicit/[...slug]": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/catchall-explicit/[...slug].json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/catchall\\-explicit\\/(.+?)\\.json$",
@@ -24,17 +24,17 @@
      "routeRegex": "^\\/catchall\\-optional(?:\\/(.+?))?(?:\\/)?$",
    },
    "/catchall/[...slug]": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/catchall/[...slug].json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/catchall\\/(.+?)\\.json$",
-     "fallback": "/catchall/[...slug].html",
+     "fallback": false,
      "routeRegex": "^\\/catchall\\/(.+?)(?:\\/)?$",
    },
    "/fallback-only/[slug]": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/fallback-only/[slug].json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/fallback\\-only\\/([^\\/]+?)\\.json$",
-     "fallback": "/fallback-only/[slug].html",
+     "fallback": false,
      "routeRegex": "^\\/fallback\\-only\\/([^\\/]+?)(?:\\/)?$",
    },
    "/lang/[lang]/about": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/lang/[lang]/about.json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/lang\\/([^\\/]+?)\\/about\\.json$",
@@ -42,15 +42,15 @@
      "routeRegex": "^\\/lang\\/([^\\/]+?)\\/about(?:\\/)?$",
    },
    "/non-json/[p]": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/non-json/[p].json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/non\\-json\\/([^\\/]+?)\\.json$",
-     "fallback": "/non-json/[p].html",
+     "fallback": false,
      "routeRegex": "^\\/non\\-json\\/([^\\/]+?)(?:\\/)?$",
    },
    "/user/[user]/profile": Object {
      "dataRoute": "/_next/data/-Oxhx0bhoDlnucGqHU6WR/user/[user]/profile.json",
      "dataRouteRegex": "^\\/_next\\/data\\/\\-Oxhx0bhoDlnucGqHU6WR\\/user\\/([^\\/]+?)\\/profile\\.json$",
-     "fallback": "/user/[user]/profile.html",
+     "fallback": false,
      "routeRegex": "^\\/user\\/([^\\/]+?)\\/profile(?:\\/)?$",
    },
  }

  1067 |       expect(manifest.version).toBe(2)
  1068 |       expect(manifest.routes).toEqual(expectedManifestRoutes())
> 1069 |       expect(manifest.dynamicRoutes).toEqual({
       |                                      ^
  1070 |         '/blog/[post]': {
  1071 |           fallback: '/blog/[post].html',
  1072 |           dataRoute: `/_next/data/${buildId}/blog/[post].json`,

  at Object.<anonymous> (integration/prerender/test/index.test.js:1069:38)

● SSG Prerender › enumlated serverless mode › should call /_error GIP on 500

expect(received).toMatch(expected)

Expected substring: "CUSTOM_ERROR_GIP_CALLED"
Received string:    ""

  1276 |         expect(res.status).toBe(500)
  1277 |         expect(await res.text()).toBe('FAIL_FUNCTION')
> 1278 |         expect(stderr).toMatch('CUSTOM_ERROR_GIP_CALLED')
       |                        ^
  1279 |         expect(stderr).not.toMatch('!!! WARNING !!!')
  1280 |       })
  1281 |     }

  at Object.<anonymous> (integration/prerender/test/index.test.js:1278:24)
      at runMicrotasks (<anonymous>)

● SSG Prerender › production mode › should reload page on failed data request, and retry

TIMED OUT: [object Object]

abc

  373 | 
  374 |   if (hardError) {
> 375 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  376 |   }
  377 |   return false
  378 | }

  at check (lib/next-test-utils.js:375:11)
  at Object.<anonymous> (integration/prerender/test/index.test.js:470:9)

● SSG Prerender › production mode › should support lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: ""

  493 |     const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths')
  494 |     const $ = cheerio.load(html)
> 495 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  496 | 
  497 |     // hydration
  498 |     const browser = await webdriver(appPort, '/catchall/delayby3s')

  at Object.<anonymous> (integration/prerender/test/index.test.js:495:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › production mode › should support nested lazy catchall route

expect(received).toBe(expected) // Object.is equality

Expected: "fallback"
Received: ""

  514 |     )
  515 |     const $ = cheerio.load(html)
> 516 |     expect($('#catchall').text()).toBe('fallback')
      |                                   ^
  517 | 
  518 |     // hydration
  519 |     const browser = await webdriver(appPort, '/catchall/delayby3s/nested')

  at Object.<anonymous> (integration/prerender/test/index.test.js:516:35)
      at runMicrotasks (<anonymous>)

● SSG Prerender › production mode › should handle fallback only page correctly HTML

NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"p"}
  (Session info: headless chrome=83.0.4103.97)

  555 |       const browser = await webdriver(appPort, '/fallback-only/first%2Fpost')
  556 | 
> 557 |       const text = await browser.elementByCss('p').text()
      |                    ^
  558 |       expect(text).toContain('hi fallback')
  559 | 
  560 |       // wait for fallback data to load

  at Object.throwDecodedError (../node_modules/selenium-webdriver/lib/error.js:550:15)
  at parseHttpResponse (../node_modules/selenium-webdriver/lib/http.js:563:13)
  at Executor.execute (../node_modules/selenium-webdriver/lib/http.js:489:26)
      at runMicrotasks (<anonymous>)
  at thenableWebDriverProxy.execute (../node_modules/selenium-webdriver/lib/webdriver.js:699:17)
  at Object.<anonymous> (integration/prerender/test/index.test.js:557:20)

● SSG Prerender › production mode › should handle fallback only page correctly HTML

thrown: "Exceeded timeout of 120000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  552 | 
  553 |   if (!isEmulatedServerless) {
> 554 |     it('should handle fallback only page correctly HTML', async () => {
      |     ^
  555 |       const browser = await webdriver(appPort, '/fallback-only/first%2Fpost')
  556 | 
  557 |       const text = await browser.elementByCss('p').text()

  at runTests (integration/prerender/test/index.test.js:554:5)
  at integration/prerender/test/index.test.js:1576:5
  at integration/prerender/test/index.test.js:1550:3
  at Object.<anonymous> (integration/prerender/test/index.test.js:1285:1)

● SSG Prerender › production mode › should not show error for invalid JSON returned from getStaticProps on SSR

TIMED OUT: /hello /

404
This page could not be found.

  373 | 
  374 |   if (hardError) {
> 375 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content)
      |           ^
  376 |   }
  377 |   return false
  378 | }

  at check (lib/next-test-utils.js:375:11)
  at Object.<anonymous> (integration/prerender/test/index.test.js:850:9)

● SSG Prerender › production mode › outputs dataRoutes in routes-manifest correctly

expect(received).toEqual(expected) // deep equality

- Expected  - 8
+ Received  + 0

@@ -6,18 +6,10 @@
    Object {
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/another.json$",
      "page": "/another",
    },
    Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/bad-gssp.json$",
-     "page": "/bad-gssp",
-   },
-   Object {
-     "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/bad-ssr.json$",
-     "page": "/bad-ssr",
-   },
-   Object {
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/blog.json$",
      "page": "/blog",
    },
    Object {
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/blog\\/([^\\/]+?)\\.json$",

  867 |       }
  868 | 
> 869 |       expect(dataRoutes).toEqual([
      |                          ^
  870 |         {
  871 |           dataRouteRegex: normalizeRegEx(
  872 |             `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/index.json$`

  at Object.<anonymous> (integration/prerender/test/index.test.js:869:26)

● SSG Prerender › production mode › outputs a prerender-manifest correctly

expect(received).toEqual(expected) // deep equality

- Expected  - 6
+ Received  + 6

@@ -1,16 +1,16 @@
  Object {
    "/blog/[post]": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/blog/[post].json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/blog\\/([^\\/]+?)\\.json$",
-     "fallback": "/blog/[post].html",
+     "fallback": false,
      "routeRegex": "^\\/blog\\/([^\\/]+?)(?:\\/)?$",
    },
    "/blog/[post]/[comment]": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/blog/[post]/[comment].json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/blog\\/([^\\/]+?)\\/([^\\/]+?)\\.json$",
-     "fallback": "/blog/[post]/[comment].html",
+     "fallback": false,
      "routeRegex": "^\\/blog\\/([^\\/]+?)\\/([^\\/]+?)(?:\\/)?$",
    },
    "/catchall-explicit/[...slug]": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/catchall-explicit/[...slug].json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/catchall\\-explicit\\/(.+?)\\.json$",
@@ -24,17 +24,17 @@
      "routeRegex": "^\\/catchall\\-optional(?:\\/(.+?))?(?:\\/)?$",
    },
    "/catchall/[...slug]": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/catchall/[...slug].json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/catchall\\/(.+?)\\.json$",
-     "fallback": "/catchall/[...slug].html",
+     "fallback": false,
      "routeRegex": "^\\/catchall\\/(.+?)(?:\\/)?$",
    },
    "/fallback-only/[slug]": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/fallback-only/[slug].json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/fallback\\-only\\/([^\\/]+?)\\.json$",
-     "fallback": "/fallback-only/[slug].html",
+     "fallback": false,
      "routeRegex": "^\\/fallback\\-only\\/([^\\/]+?)(?:\\/)?$",
    },
    "/lang/[lang]/about": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/lang/[lang]/about.json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/lang\\/([^\\/]+?)\\/about\\.json$",
@@ -42,15 +42,15 @@
      "routeRegex": "^\\/lang\\/([^\\/]+?)\\/about(?:\\/)?$",
    },
    "/non-json/[p]": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/non-json/[p].json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/non\\-json\\/([^\\/]+?)\\.json$",
-     "fallback": "/non-json/[p].html",
+     "fallback": false,
      "routeRegex": "^\\/non\\-json\\/([^\\/]+?)(?:\\/)?$",
    },
    "/user/[user]/profile": Object {
      "dataRoute": "/_next/data/aonMgNLa70yZMDREaQW5S/user/[user]/profile.json",
      "dataRouteRegex": "^\\/_next\\/data\\/aonMgNLa70yZMDREaQW5S\\/user\\/([^\\/]+?)\\/profile\\.json$",
-     "fallback": "/user/[user]/profile.html",
+     "fallback": false,
      "routeRegex": "^\\/user\\/([^\\/]+?)\\/profile(?:\\/)?$",
    },
  }

  1067 |       expect(manifest.version).toBe(2)
  1068 |       expect(manifest.routes).toEqual(expectedManifestRoutes())
> 1069 |       expect(manifest.dynamicRoutes).toEqual({
       |                                      ^
  1070 |         '/blog/[post]': {
  1071 |           fallback: '/blog/[post].html',
  1072 |           dataRoute: `/_next/data/${buildId}/blog/[post].json`,

  at Object.<anonymous> (integration/prerender/test/index.test.js:1069:38)

● SSG Prerender › export mode › should copy prerender files and honor exportTrailingSlash

ENOENT: no such file or directory, rename '/home/runner/work/next.js/next.js/test/integration/prerender/pages/bad-gssp.js' -> '/home/runner/work/next.js/next.js/test/integration/prerender/pages/bad-gssp.js.bak'

● SSG Prerender › export mode › should navigate between pages successfully

ENOENT: no such file or directory, rename '/home/runner/work/next.js/next.js/test/integration/prerender/pages/bad-gssp.js' -> '/home/runner/work/next.js/next.js/test/integration/prerender/pages/bad-gssp.js.bak'

● Test suite failed to run

TypeError: obj[method] is not a function

  321 |     ]
  322 | 
> 323 |     obj[method](...newArgs)
      |     ^
  324 |   })
  325 | }
  326 | 

  at lib/next-test-utils.js:323:5
  at promiseCall (lib/next-test-utils.js:314:10)
  at stopApp (lib/next-test-utils.js:310:9)
  at integration/prerender/test/index.test.js:1637:13

@Janpot
Copy link
Contributor Author

Janpot commented Jun 23, 2020

@ijjk Looks like #14413 fixed part of this issue in a different way and merging master has caused some double encoding type of issue. Updated the PR

@ijjk
Copy link
Member

ijjk commented Jun 23, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 12.1s 12.1s -88ms
nodeModulesSize 67.1 MB 67.1 MB ⚠️ +3.68 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 2.06 2.042 -0.02
/ avg req/sec 1213.73 1224.13 ⚠️ +10.4
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.311 1.215 -0.1
/error-in-render avg req/sec 1907.55 2057.59 ⚠️ +150.04
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.52 kB 6.49 kB -31 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..62e5.js gzip 10.6 kB 10.6 kB ⚠️ +56 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57 kB 57 kB ⚠️ +25 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.61 kB 5.57 kB -35 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.93 kB 6.99 kB ⚠️ +53 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.4 kB ⚠️ +18 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 956 B 953 B -3 B
link.html gzip 961 B 957 B -4 B
withRouter.html gzip 948 B 945 B -3 B
Overall change 2.87 kB 2.85 kB -10 B

Diffs

Diff for 19b7e98f51cc..96.module.js
@@ -216,6 +216,30 @@
       /***/
     },
 
+    /***/ Lab5: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.default = getAssetPathFromRoute; // Translates a logical route into its pages asset path (relative from a common prefix)
+      // "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      /***/
+    },
+
     /***/ Qetd: /***/ function(module, exports, __webpack_require__) {
       "use strict";
       var assign = Object.assign.bind(Object);
@@ -607,6 +631,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -632,8 +660,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -660,7 +687,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _getAssetPathFromRoute.default)(pathname, ".json")
+                  )
               ),
               query
             }),
Diff for 19b7e98f51cc..8bf3c44ba.js
@@ -239,6 +239,30 @@
       /***/
     },
 
+    /***/ Lab5: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports["default"] = getAssetPathFromRoute; // Translates a logical route into its pages asset path (relative from a common prefix)
+      // "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      /***/
+    },
+
     /***/ Qetd: /***/ function(module, exports, __webpack_require__) {
       "use strict";
       var assign = Object.assign.bind(Object);
@@ -737,6 +761,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -762,8 +790,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -790,7 +817,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _getAssetPathFromRoute["default"])(pathname, ".json")
+                  )
               ),
               query: query
             }),
Diff for main-HASH.js
@@ -1430,7 +1430,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1443,6 +1442,10 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1476,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1576,11 +1571,14 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _getAssetPathFromRoute["default"])(
+                    path,
+                    ".json"
+                  );
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
-                    .concat(dataRoute, ".json");
+                    .concat(dataRoute);
                 };
 
               var _ref = (0, _url.parse)(href, true),
@@ -1833,7 +1831,7 @@
                 url = route;
               } else {
                 if (false) {
-                  var ext, scriptRoute;
+                  var scriptRoute, ext;
                 }
               }
Diff for main-HASH.module.js
@@ -1071,7 +1071,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1084,6 +1083,10 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1117,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1201,11 +1196,14 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _getAssetPathFromRoute.default)(
+                path,
+                ".json"
+              );
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
-                .concat(dataRoute, ".json");
+                .concat(dataRoute);
             };
 
           var { pathname: hrefPathname, query } = (0, _url.parse)(href, true);
@@ -1418,7 +1416,7 @@
             url = route;
           } else {
             if (false) {
-              var ext, scriptRoute;
+              var scriptRoute, ext;
             }
           }
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 12.8s 12.4s -454ms
nodeModulesSize 67.1 MB 67.1 MB ⚠️ +3.68 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.52 kB 6.49 kB -31 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..62e5.js gzip 10.6 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..bcce.js gzip N/A 10.6 kB N/A
Overall change 57 kB 57 kB ⚠️ +25 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.61 kB 5.57 kB -35 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.93 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 6.99 kB N/A
Overall change 52.4 kB 52.4 kB ⚠️ +18 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 914 kB ⚠️ +589 B
routerDirect.js 906 kB 907 kB ⚠️ +589 B
withRouter.js 906 kB 907 kB ⚠️ +589 B
Overall change 4.48 MB 4.49 MB ⚠️ +1.77 kB
Commit: b0002ae

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

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

LGTM

@ijjk
Copy link
Member

ijjk commented Jun 23, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 9.6s 9.5s -96ms
nodeModulesSize 67.1 MB 67.1 MB ⚠️ +3.68 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
/ failed reqs 0 0
/ total time (seconds) 1.683 1.627 -0.06
/ avg req/sec 1485.72 1536.15 ⚠️ +50.43
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 0.986 0.959 -0.03
/error-in-render avg req/sec 2536.08 2607.16 ⚠️ +71.08
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.52 kB 6.49 kB -31 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..62e5.js gzip 10.6 kB 10.6 kB ⚠️ +56 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57 kB 57 kB ⚠️ +25 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.61 kB 5.57 kB -35 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.93 kB 6.99 kB ⚠️ +53 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.4 kB 52.4 kB ⚠️ +18 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js wip-remove-index Change
index.html gzip 956 B 953 B -3 B
link.html gzip 961 B 957 B -4 B
withRouter.html gzip 948 B 945 B -3 B
Overall change 2.87 kB 2.85 kB -10 B

Diffs

Diff for 19b7e98f51cc..96.module.js
@@ -216,6 +216,30 @@
       /***/
     },
 
+    /***/ Lab5: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports.default = getAssetPathFromRoute; // Translates a logical route into its pages asset path (relative from a common prefix)
+      // "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      /***/
+    },
+
     /***/ Qetd: /***/ function(module, exports, __webpack_require__) {
       "use strict";
       var assign = Object.assign.bind(Object);
@@ -607,6 +631,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -632,8 +660,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -660,7 +687,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _getAssetPathFromRoute.default)(pathname, ".json")
+                  )
               ),
               query
             }),
Diff for 19b7e98f51cc..8bf3c44ba.js
@@ -239,6 +239,30 @@
       /***/
     },
 
+    /***/ Lab5: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      exports.__esModule = true;
+      exports["default"] = getAssetPathFromRoute; // Translates a logical route into its pages asset path (relative from a common prefix)
+      // "asset path" being its javascript file, data file, prerendered html,...
+
+      function getAssetPathFromRoute(route) {
+        var ext =
+          arguments.length > 1 && arguments[1] !== undefined
+            ? arguments[1]
+            : "";
+        var path =
+          route === "/"
+            ? "/index"
+            : /^\/index(\/|$)/.test(route)
+            ? "/index".concat(route)
+            : "".concat(route);
+        return path + ext;
+      }
+
+      /***/
+    },
+
     /***/ Qetd: /***/ function(module, exports, __webpack_require__) {
       "use strict";
       var assign = Object.assign.bind(Object);
@@ -737,6 +761,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function _interopRequireDefault(obj) {
         return obj && obj.__esModule
           ? obj
@@ -762,8 +790,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       function prepareRoute(path) {
-        path = delBasePath(path || "");
-        return toRoute(!path || path === "/" ? "/index" : path);
+        return toRoute(delBasePath(path || "") || "/");
       }
 
       function prepareUrlAs(url, as) {
@@ -790,7 +817,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                 // @ts-ignore __NEXT_DATA__
                 "/_next/data/"
                   .concat(__NEXT_DATA__.buildId)
-                  .concat(pathname, ".json")
+                  .concat(
+                    (0, _getAssetPathFromRoute["default"])(pathname, ".json")
+                  )
               ),
               query: query
             }),
Diff for main-HASH.js
@@ -1430,7 +1430,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports["default"] = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1443,6 +1442,10 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1476,14 +1479,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise(function(res, rej, link) {
           link = document.createElement("link");
@@ -1576,11 +1571,14 @@
               var getHrefForSlug =
                 /** @type string */
                 function getHrefForSlug(path) {
-                  var dataRoute = getAssetPath(path);
+                  var dataRoute = (0, _getAssetPathFromRoute["default"])(
+                    path,
+                    ".json"
+                  );
                   return ""
                     .concat(_this2.assetPrefix, "/_next/data/")
                     .concat(_this2.buildId)
-                    .concat(dataRoute, ".json");
+                    .concat(dataRoute);
                 };
 
               var _ref = (0, _url.parse)(href, true),
@@ -1833,7 +1831,7 @@
                 url = route;
               } else {
                 if (false) {
-                  var ext, scriptRoute;
+                  var scriptRoute, ext;
                 }
               }
Diff for main-HASH.module.js
@@ -1071,7 +1071,6 @@
       var _interopRequireDefault = __webpack_require__("TqRt");
 
       exports.__esModule = true;
-      exports.getAssetPath = getAssetPath;
       exports.default = void 0;
 
       var _url = __webpack_require__("QmWs");
@@ -1084,6 +1083,10 @@
 
       var _routeRegex = __webpack_require__("YTqd");
 
+      var _getAssetPathFromRoute = _interopRequireDefault(
+        __webpack_require__("Lab5")
+      );
+
       function hasRel(rel, link) {
         try {
           link = document.createElement("link");
@@ -1117,14 +1120,6 @@
         return route.replace(/\/$/, "");
       }
 
-      function getAssetPath(route) {
-        return route === "/"
-          ? "/index"
-          : /^\/index(\/|$)/.test(route)
-          ? "/index".concat(route)
-          : "".concat(route);
-      }
-
       function appendLink(href, rel, as) {
         return new Promise((res, rej, link) => {
           link = document.createElement("link");
@@ -1201,11 +1196,14 @@
           var getHrefForSlug =
             /** @type string */
             path => {
-              var dataRoute = getAssetPath(path);
+              var dataRoute = (0, _getAssetPathFromRoute.default)(
+                path,
+                ".json"
+              );
               return ""
                 .concat(this.assetPrefix, "/_next/data/")
                 .concat(this.buildId)
-                .concat(dataRoute, ".json");
+                .concat(dataRoute);
             };
 
           var { pathname: hrefPathname, query } = (0, _url.parse)(href, true);
@@ -1418,7 +1416,7 @@
             url = route;
           } else {
             if (false) {
-              var ext, scriptRoute;
+              var scriptRoute, ext;
             }
           }
Diff for index.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -86,13 +86,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <meta name="next-head-count" content="2" />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      href="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      href="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -81,13 +81,13 @@
       src="/_next/static/runtime/polyfills-b9d354b83d10fbe21b38.js"
     ></script>
     <script
-      src="/_next/static/runtime/main-cf0b7e43251fd4df3911.js"
+      src="/_next/static/runtime/main-d16a50b6915cf775943f.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/runtime/main-c88e5b9647134fe3d99a.module.js"
+      src="/_next/static/runtime/main-1814f0d8ef179fb12882.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.45aa21b8a4d8bf3c44ba.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.3bf88d6a54d78a1ad7fa.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.38f50e949e1a74742f96.module.js"
+      src="/_next/static/chunks/19b7e98f51cc0d86c45d01159bbbfb942bfe49b8.a305f69ab07958bac8bd.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
buildDuration 10.2s 10.2s ⚠️ +54ms
nodeModulesSize 67.1 MB 67.1 MB ⚠️ +3.68 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.js gzip 6.52 kB 6.49 kB -31 B
webpack-HASH.js gzip 746 B 746 B
19b7e98f51cc..62e5.js gzip 10.6 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..bcce.js gzip N/A 10.6 kB N/A
Overall change 57 kB 57 kB ⚠️ +25 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
main-HASH.module.js gzip 5.61 kB 5.57 kB -35 B
webpack-HASH..dule.js gzip 746 B 746 B
19b7e98f51cc..dule.js gzip 6.93 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
19b7e98f51cc..dule.js gzip N/A 6.99 kB N/A
Overall change 52.4 kB 52.4 kB ⚠️ +18 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js wip-remove-index Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js wip-remove-index Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 539 B 539 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js wip-remove-index Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 875 kB 875 kB
link.js 914 kB 915 kB ⚠️ +589 B
routerDirect.js 906 kB 907 kB ⚠️ +589 B
withRouter.js 906 kB 907 kB ⚠️ +589 B
Overall change 4.48 MB 4.49 MB ⚠️ +1.77 kB
Commit: ad6845d

@kodiakhq kodiakhq bot merged commit bc2cb22 into vercel:canary Jun 23, 2020
@Janpot Janpot deleted the wip-remove-index branch June 23, 2020 05:51
rokinsky pushed a commit to rokinsky/next.js that referenced this pull request Jul 11, 2020
Noticed this while reviewing vercel#14376. After having done vercel#13699, this code didn't feel right to me:
```js
function prepareRoute(path: string) {
  path = delBasePath(path || '')
  // this /index rewrite is problematic, it makes pages/index.js 
  // and pages/index/index.js point to the same thing:
  return toRoute(!path || path === '/' ? '/index' : path)
}
```
Added a nested index page to the prerender tests and found it was rendering the `/` route on navigation. This uncovered 2 more places around the dataroute where the index path was not translated correctly.

**edit:**

Just to note that there was nothing wrong with vercel#14376, the issue was already there, I just noticed it while reading that PR
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 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.

3 participants