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

Allow pages to be async modules to enable top-level-await #17590

Merged
merged 21 commits into from Oct 14, 2020

Conversation

Janpot
Copy link
Contributor

@Janpot Janpot commented Oct 3, 2020

Makes it possible to use top level await in Next.js pages and api handlers. Requires webpack 5.

See also #11185

TODO:

  • add tests
  • serverless mode
  • async error and document page modules
  • tests for gssp, gsp
  • fix lint, ignored for now, seems like a round of babel packages updates is needed. Will follow that up in another PR
  • do we want to enable top-level-await by default when webpack 5 is installed? Or should people configure this themselves in next.config.js? => people should configure experimental features themselves

@ijjk ijjk added the type: next label Oct 3, 2020
@ijjk
Copy link
Member

ijjk commented Oct 3, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 12.8s 13.3s ⚠️ +548ms
nodeModulesSize 63.1 MB 63.1 MB ⚠️ +229 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.49 2.505 ⚠️ +0.01
/ avg req/sec 1003.88 998.09 ⚠️ -5.79
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.437 1.442 0
/error-in-render avg req/sec 1739.49 1733.43 ⚠️ -6.06
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..9339.js gzip 10.9 kB 10.9 kB
framework.HASH.js gzip 39 kB 39 kB
main-d493e7d..42f5.js gzip 7.17 kB 7.25 kB ⚠️ +80 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.8 kB 57.9 kB ⚠️ +80 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.77 kB 6.77 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-f8905d4..dule.js gzip 6.24 kB 6.25 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.7 kB 52.7 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB ⚠️ +1 B
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB ⚠️ +1 B

Diffs

Diff for main-1638ee9..a9.module.js
@@ -1535,21 +1535,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-7f74095..c7a3b6f9a.js
@@ -1553,6 +1553,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1734,13 +1738,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1754,7 +1758,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1773,7 +1777,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1796,7 +1800,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(href, asPath, true)) && // noop when data has already been prefetched (dedupe)
+                  (_dataHref = _this4.getDataHref(href, asPath, true)) && // noop when data has already been prefetched (dedupe)
                   !document.querySelector(
                     'link[rel="'
                       .concat(relPrefetch, '"][href^="')
@@ -1824,12 +1828,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1842,9 +1846,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1853,13 +1857,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1901,7 +1905,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1918,29 +1922,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -1995,11 +2039,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2013,7 +2057,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2055,7 +2099,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-1638ee97dc3a5972faa9.module.js"
+      href="/_next/static/chunks/main-d860420c8ef8a02943cf.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7f740958d0cc7a3b6f9a.js"
+      src="/_next/static/chunks/main-da54a243c2675c9db0d8.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-1638ee97dc3a5972faa9.module.js"
+      src="/_next/static/chunks/main-d860420c8ef8a02943cf.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-1638ee97dc3a5972faa9.module.js"
+      href="/_next/static/chunks/main-d860420c8ef8a02943cf.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7f740958d0cc7a3b6f9a.js"
+      src="/_next/static/chunks/main-da54a243c2675c9db0d8.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-1638ee97dc3a5972faa9.module.js"
+      src="/_next/static/chunks/main-d860420c8ef8a02943cf.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-1638ee97dc3a5972faa9.module.js"
+      href="/_next/static/chunks/main-d860420c8ef8a02943cf.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-7f740958d0cc7a3b6f9a.js"
+      src="/_next/static/chunks/main-da54a243c2675c9db0d8.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-1638ee97dc3a5972faa9.module.js"
+      src="/_next/static/chunks/main-d860420c8ef8a02943cf.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.6s 15.2s ⚠️ +564ms
nodeModulesSize 63.1 MB 63.1 MB ⚠️ +229 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..9339.js gzip 10.9 kB 10.9 kB
framework.HASH.js gzip 39 kB 39 kB
main-d493e7d..42f5.js gzip 7.17 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-129b73f..8c67.js gzip N/A 7.25 kB N/A
Overall change 57.8 kB 57.9 kB ⚠️ +80 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.77 kB 6.77 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-f8905d4..dule.js gzip 6.24 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-b135fe8..dule.js gzip N/A 6.25 kB N/A
Overall change 52.7 kB 52.7 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-d2344ce..8b36.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.71 kB 7.71 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-f8c0daf..dule.js gzip 1.26 kB 1.26 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 651 B 651 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +10 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +10 B
link.js 1.1 MB 1.1 MB ⚠️ +10 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +10 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +10 B
Overall change 5.4 MB 5.4 MB ⚠️ +50 B
Commit: 11da014

@ijjk
Copy link
Member

ijjk commented Oct 3, 2020

Failing test suites

Commit: 11da014

test/integration/build-output/test/index.test.js

  • Build Output > Basic Application Output > should not deviate from snapshot
Expand output

● Build Output › Basic Application Output › should not deviate from snapshot

expect(received).toBeLessThanOrEqual(expected)

Expected: <= 0
Received:    0.10000000000000142

  102 |       expect(err404Size.endsWith('kB')).toBe(true)
  103 | 
> 104 |       expect(parseFloat(err404FirstLoad) - 63.8).toBeLessThanOrEqual(0)
      |                                                  ^
  105 |       expect(err404FirstLoad.endsWith('kB')).toBe(true)
  106 | 
  107 |       expect(parseFloat(sharedByAll) - 60.4).toBeLessThanOrEqual(0)

  at Object.<anonymous> (integration/build-output/test/index.test.js:104:50)

test/integration/size-limit/test/index.test.js

  • Production response size > should not increase the overall response size of default build
Expand output

● Production response size › should not increase the overall response size of default build

expect(received).toBeLessThanOrEqual(expected)

Expected: <= 1024
Received:    1244

  82 |     // These numbers are without gzip compression!
  83 |     const delta = responseSizesBytes - 279 * 1024
> 84 |     expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb
     |                   ^
  85 |     expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target
  86 |   })
  87 | 

  at Object.<anonymous> (integration/size-limit/test/index.test.js:84:19)

@ijjk
Copy link
Member

ijjk commented Oct 11, 2020

Failing test suites

Commit: 3763db9

test/integration/async-modules/test/index.test.js

Expand output

● Test suite failed to run

Your test suite must contain at least one test.

  at ../node_modules/@jest/core/build/TestScheduler.js:242:24
  at asyncGeneratorStep (../node_modules/@jest/core/build/TestScheduler.js:131:24)
  at _next (../node_modules/@jest/core/build/TestScheduler.js:151:9)
  at ../node_modules/@jest/core/build/TestScheduler.js:156:7
  at ../node_modules/@jest/core/build/TestScheduler.js:148:12
  at onResult (../node_modules/@jest/core/build/TestScheduler.js:271:25)

@ijjk
Copy link
Member

ijjk commented Oct 11, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.2s 13.2s ⚠️ +1ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +229 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.439 2.42 -0.02
/ avg req/sec 1024.82 1033 +8.18
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.281 1.362 ⚠️ +0.08
/error-in-render avg req/sec 1951.16 1836.09 ⚠️ -115.07
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 15s 14.9s -41ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +229 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +10 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +10 B
link.js 1.1 MB 1.1 MB ⚠️ +10 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +10 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +10 B
Overall change 5.41 MB 5.41 MB ⚠️ +50 B
Commit: 3763db9

@ijjk
Copy link
Member

ijjk commented Oct 11, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 12.8s 13.1s ⚠️ +280ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +229 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.442 2.389 -0.05
/ avg req/sec 1023.6 1046.35 +22.75
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.313 1.343 ⚠️ +0.03
/error-in-render avg req/sec 1904.43 1861.93 ⚠️ -42.5
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.7s 14.7s -36ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +229 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +10 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +10 B
link.js 1.1 MB 1.1 MB ⚠️ +10 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +10 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +10 B
Overall change 5.41 MB 5.41 MB ⚠️ +50 B
Commit: 507923a

@ijjk
Copy link
Member

ijjk commented Oct 11, 2020

Failing test suites

Commit: 2204789

test/integration/auto-export-error-bail/test/index.test.js

  • Auto Export _error bail > serverless mode > should not opt-out of auto static optimization from invalid _error
Expand output

● Auto Export _error bail › serverless mode › should not opt-out of auto static optimization from invalid _error

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

Expected: 0
Received: 1

  22 |     const combinedOutput = output.stderr + output.stdout
  23 | 
> 24 |     expect(output.code).toBe(0)
     |                         ^
  25 |     expect(combinedOutput).not.toContain(
  26 |       'You have opted-out of Automatic Static Optimization due to'
  27 |     )

  at Object.<anonymous> (integration/auto-export-error-bail/test/index.test.js:24:25)

test/integration/404-page-ssg/test/index.test.js

  • 404 Page Support SSG > serverless mode > should build successfully
  • 404 Page Support SSG > serverless mode > should respond to 404 correctly
  • 404 Page Support SSG > serverless mode > should render error correctly
  • 404 Page Support SSG > serverless mode > should not show an error in the logs for 404 SSG
  • 404 Page Support SSG > serverless mode > should render index page normal
  • 404 Page Support SSG > serverless mode > should not revalidate custom 404 page
Expand output

● 404 Page Support SSG › serverless mode › should build successfully

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

Expected: 0
Received: 1

  139 |       })
  140 | 
> 141 |       expect(code).toBe(0)
      |                    ^
  142 |       expect(buildStderr).not.toMatch(gip404Err)
  143 |       expect(buildStdout).not.toMatch(gip404Err)
  144 | 

  at Object.<anonymous> (integration/404-page-ssg/test/index.test.js:141:20)

● 404 Page Support SSG › serverless mode › should respond to 404 correctly

FetchError: request to http://localhost:41209/404 failed, reason: connect ECONNREFUSED 127.0.0.1:41209

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● 404 Page Support SSG › serverless mode › should render error correctly

FetchError: request to http://localhost:41209/err failed, reason: connect ECONNREFUSED 127.0.0.1:41209

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● 404 Page Support SSG › serverless mode › should not show an error in the logs for 404 SSG

FetchError: request to http://localhost:41209/non-existent failed, reason: connect ECONNREFUSED 127.0.0.1:41209

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● 404 Page Support SSG › serverless mode › should render index page normal

FetchError: request to http://localhost:41209/ failed, reason: connect ECONNREFUSED 127.0.0.1:41209

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● 404 Page Support SSG › serverless mode › should not revalidate custom 404 page

FetchError: request to http://localhost:41209/non-existent failed, reason: connect ECONNREFUSED 127.0.0.1:41209

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

test/integration/404-page-custom-error/test/index.test.js

  • Default 404 Page with custom _error > serverless mode > should build successfully
  • Default 404 Page with custom _error > serverless mode > should respond to 404 correctly
  • Default 404 Page with custom _error > serverless mode > should render error correctly
  • Default 404 Page with custom _error > serverless mode > should render index page normal
Expand output

● Default 404 Page with custom _error › serverless mode › should build successfully

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

Expected: 0
Received: 1

  92 |       })
  93 | 
> 94 |       expect(code).toBe(0)
     |                    ^
  95 | 
  96 |       appPort = await findPort()
  97 |       app = await nextStart(appDir, appPort)

  at Object.<anonymous> (integration/404-page-custom-error/test/index.test.js:94:20)

● Default 404 Page with custom _error › serverless mode › should respond to 404 correctly

FetchError: request to http://localhost:34245/404 failed, reason: connect ECONNREFUSED 127.0.0.1:34245

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Default 404 Page with custom _error › serverless mode › should render error correctly

FetchError: request to http://localhost:34245/err failed, reason: connect ECONNREFUSED 127.0.0.1:34245

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

● Default 404 Page with custom _error › serverless mode › should render index page normal

FetchError: request to http://localhost:34245/ failed, reason: connect ECONNREFUSED 127.0.0.1:34245

  at ClientRequest.<anonymous> (../node_modules/node-fetch/lib/index.js:1461:11)

test/integration/auto-export-serverless-error/test/index.test.js

  • Auto Export Error Serverless > fails to emit the page
Expand output

● Auto Export Error Serverless › fails to emit the page

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

Expected substring: "ReferenceError"
Received string:    "Failed to compile.·
/home/runner/work/next.js/next.js/packages/next/dist/build/webpack/loaders/next-serverless-loader.js?page=%2F&absolutePagePath=private-next-pages%2Findex.js&absoluteAppPath=next%2Fdist%2Fpages%2F_app&absoluteDocumentPath=next%2Fdist%2Fpages%2F_document&absoluteErrorPath=next%2Fdist%2Fpages%2F_error&distDir=private-dot-next&buildId=WomXOCAX8uuOcL7lcex0M&assetPrefix=&generateEtags=true&poweredByHeader=true&canonicalBase=&basePath=&runtimeConfig=&previewProps=%7B%22previewModeId%22%3A%2235dd2b78d8ca5db8ce020639c12e9db9%22%2C%22previewModeSigningKey%22%3A%221b37f0ba591da2d629c5008b51c5c19f5d4e24f8aa1edca1e6ed5ab821dd7025%22%2C%22previewModeEncryptionKey%22%3A%22bb5fe0c50b9537d69be842762256ab34df5bc36d834c42b0b0fddf407272a5b4%22%7D&loadedEnvFiles=W10%3D&i18n= 34:8
Module parse failed: Cannot use keyword 'await' outside an async function (34:8)
File was processed with these loaders:
 * ../../../packages/next/dist/build/webpack/loaders/next-serverless-loader.js
You may need an additional loader to handle the result of these loaders.
|       { default: Error },
|       { default: Component, ...ComponentInfo }
>     ] = await Promise.all([
|       require('next/dist/pages/_app'),
|       require('next/dist/pages/_document'),··
> Build error occurred
Error: > webpack config.resolve.alias was incorrectly overridden. https://err.sh/vercel/next.js/invalid-resolve-alias

  13 | if(clientResult.errors.length>0){result={warnings:[...clientResult.warnings],errors:[...clientResult.errors]};}else{const serverResult=await(0,_compiler.runCompiler)(configs[1]);result={warnings:[...clientResult.warnings,...serverResult.warnings],errors:[...clientResult.errors,...serverResult.errors]};}}else{result=await(0,_compiler.runCompiler)(configs);}const webpackBuildEnd=process.hrtime(webpackBuildStart);if(buildSpinner){buildSpinner.stopAndPersist();}result=(0,_formatWebpackMessages.default)(result);if(result.errors.length>0){// Only keep the first error. Others are often indicative
  14 | // of the same problem, but confuse the reader with noise.
> 15 | if(result.errors.length>1){result.errors.length=1;}const error=result.errors.join('\n\n');console.error(_chalk.default.red('Failed to compile.\n'));if(error.indexOf('private-next-pages')>-1&&error.indexOf('does not contain a default export')>-1){const page_name_regex=/*#__PURE__*/_wrapRegExp(/'private\x2Dnext\x2Dpages\/([\0-&\(-\uFFFF]*)'/,{page_name:1});const parsed=page_name_regex.exec(error);const page_name=parsed&&parsed.groups&&parsed.groups.page_name;throw new Error(`webpack build failed: found page without a React Component as default export in pages/${page_name}\n\nSee https://err.sh/vercel/next.js/page-without-valid-component for more info.`);}console.error(error);console.error();if(error.indexOf('private-next-pages')>-1||error.indexOf('__next_polyfill__')>-1){throw new Error('> webpack config.resolve.alias was incorrectly overridden. https://err.sh/vercel/next.js/invalid-resolve-alias');}throw new Error('> Build failed because of webpack errors');}else{telemetry.record((0,_events.eventBuildCompleted)(pagePaths,{durationInSeconds:webpackBuildEnd[0]}));if(result.warnings.length>0){Log.warn('Compiled with warnings\n');console.warn(result.warnings.join('\n\n'));console.warn();}else{Log.info('Compiled successfully');}}const postCompileSpinner=(0,_spinner.default)({prefixText:`${Log.prefixes.info} Collecting page data`});const manifestPath=_path.default.join(distDir,isLikeServerless?_constants2.SERVERLESS_DIRECTORY:_constants2.SERVER_DIRECTORY,_constants2.PAGES_MANIFEST);const buildManifestPath=_path.default.join(distDir,_constants2.BUILD_MANIFEST);const ssgPages=new Set();const ssgStaticFallbackPages=new Set();const ssgBlockingFallbackPages=new Set();const staticPages=new Set();const invalidPages=new Set();const hybridAmpPages=new Set();const serverPropsPages=new Set();const additionalSsgPaths=new Map();const pageInfos=new Map();const pagesManifest=JSON.parse(await _fs.promises.readFile(manifestPath,'utf8'));const buildManifest=JSON.parse(await _fs.promises.readFile(buildManifestPath,'utf8'));let customAppGetInitialProps;let namedExports;process.env.NEXT_PHASE=_constants2.PHASE_PRODUCTION_BUILD;const staticCheckWorkers=new _jestWorker.default(staticCheckWorker,{numWorkers:config.experimental.cpus,enableWorkerThreads:config.experimental.workerThreads});staticCheckWorkers.getStdout().pipe(process.stdout);staticCheckWorkers.getStderr().pipe(process.stderr);const runtimeEnvConfig={publicRuntimeConfig:config.publicRuntimeConfig,serverRuntimeConfig:config.serverRuntimeConfig};hasNonStaticErrorPage=hasCustomErrorPage&&(await(0,_utils2.hasCustomGetInitialProps)((0,_require.getPagePath)('/_error',distDir,isLikeServerless),runtimeEnvConfig,false));const analysisBegin=process.hrtime();await Promise.all(pageKeys.map(async page=>{const actualPage=(0,_normalizePagePath.normalizePagePath)(page);const[selfSize,allSize]=await(0,_utils2.getJsPageSizeInKb)(actualPage,distDir,buildManifest,config.experimental.modern);let isSsg=false;let isStatic=false;let isHybridAmp=false;let ssgPageRoutes=null;const nonReservedPage=!page.match(/^\/(_app|_error|_document|api(\/|$))/);if(nonReservedPage){const serverBundle=(0,_require.getPagePath)(page,distDir,isLikeServerless);if(customAppGetInitialProps===undefined){customAppGetInitialProps=(0,_utils2.hasCustomGetInitialProps)(isLikeServerless?serverBundle:(0,_require.getPagePath)('/_app',distDir,isLikeServerless),runtimeEnvConfig,true);namedExports=(0,_utils2.getNamedExports)(isLikeServerless?serverBundle:(0,_require.getPagePath)('/_app',distDir,isLikeServerless),runtimeEnvConfig);if(customAppGetInitialProps){console.warn(_chalk.default.bold.yellow(`Warning: `)+_chalk.default.yellow(`You have opted-out of Automatic Static Optimization due to \`getInitialProps\` in \`pages/_app\`. This does not opt-out pages with \`getStaticProps\``));console.warn('Read more: https://err.sh/next.js/opt-out-auto-static-optimization\n');}}try{var _config$experimental$,_config$experimental$2;let workerResult=await staticCheckWorkers.isPageStatic(page,serverBundle,runtimeEnvConfig,(_config$experimental$=config.experimental.i18n)==null?void 0:_config$experimental$.locales,(_config$experimental$2=config.experimental.i18n)==null?void 0:_config$experimental$2.defaultLocale);if(workerResult.isHybridAmp){isHybridAmp=true;hybridAmpPages.add(page);}if(workerResult.hasStaticProps){ssgPages.add(page);isSsg=true;if(workerResult.prerenderRoutes){additionalSsgPaths.set(page,workerResult.prerenderRoutes);ssgPageRoutes=workerResult.prerenderRoutes;}if(workerResult.prerenderFallback==='unstable_blocking'){ssgBlockingFallbackPages.add(page);}else if(workerResult.prerenderFallback===true){ssgStaticFallbackPages.add(page);}}else if(workerResult.hasServerProps){serverPropsPages.add(page);}else if(workerResult.isStatic&&customAppGetInitialProps===false){staticPages.add(page);isStatic=true;}if(hasPages404&&page==='/404'){if(!workerResult.isStatic&&!workerResult.hasStaticProps){throw new Error(_constants.PAGES_404_GET_INITIAL_PROPS_ERROR);}// we need to ensure the 404 lambda is present since we use
     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
  16 | // it when _app has getInitialProps
  17 | if(customAppGetInitialProps&&!workerResult.hasStaticProps){staticPages.delete(page);}}}catch(err){if(err.message!=='INVALID_DEFAULT_EXPORT')throw err;invalidPages.add(page);}}pageInfos.set(page,{size:selfSize,totalSize:allSize,static:isStatic,isSsg,isHybridAmp,ssgPageRoutes,initialRevalidateSeconds:false});}));staticCheckWorkers.end();if(serverPropsPages.size>0||ssgPages.size>0){// We update the routes manifest after the build with the
  18 | // data routes since we can't determine these until after build

  at build (../packages/next/dist/build/index.js:15:787)
  "
  at Object.<anonymous> (integration/auto-export-serverless-error/test/index.test.js:19:20)

test/integration/custom-page-extension/test/index.test.js

  • Custom page extension > serverless mode > should work with normal page
  • Custom page extension > serverless mode > should work dynamic page
Expand output

● Custom page extension › serverless mode › should work with normal page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

● Custom page extension › serverless mode › should work dynamic page

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

test/integration/custom-error/test/index.test.js

  • Custom _error > serverless mode > renders custom _error successfully
Expand output

● Custom _error › serverless mode › renders custom _error successfully

command failed with code 1

  132 |         code !== 0
  133 |       ) {
> 134 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  135 |       }
  136 | 
  137 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:134:23)

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.2s 13.2s -7ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +267 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.568 2.521 -0.05
/ avg req/sec 973.55 991.6 +18.05
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.537 1.503 -0.03
/error-in-render avg req/sec 1626.05 1663.82 +37.77
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 15.6s 17.6s ⚠️ +2s
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +267 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +10 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +10 B
link.js 1.1 MB 1.1 MB ⚠️ +10 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +10 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +10 B
Overall change 5.41 MB 5.41 MB ⚠️ +50 B
Commit: 633b28b

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Failing test suites

Commit: 633b28b

test/integration/api-support/test/index.test.js

  • API routes > Serverless support > should parse bigger body then 1mb
  • API routes > Serverless support > should parse body in handler
Expand output

● API routes › Serverless support › should parse bigger body then 1mb

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

Expected: 200
Received: 413

  173 |     })
  174 | 
> 175 |     expect(data.status).toEqual(200)
      |                         ^
  176 |   })
  177 | 
  178 |   it('should support etag spec', async () => {

  at Object.<anonymous> (integration/api-support/test/index.test.js:175:25)

● API routes › Serverless support › should parse body in handler

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."

  213 |   })
  214 | 
> 215 |   it('should parse body in handler', async () => {
      |   ^
  216 |     const data = await fetchViaHTTP(appPort, '/api/no-parsing', null, {
  217 |       method: 'POST',
  218 |       headers: {

  at runTests (integration/api-support/test/index.test.js:215:3)
  at integration/api-support/test/index.test.js:525:5
  at integration/api-support/test/index.test.js:509:3
  at Object.<anonymous> (integration/api-support/test/index.test.js:481:1)

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.3s 13.5s ⚠️ +259ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +241 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.521 2.543 ⚠️ +0.02
/ avg req/sec 991.82 982.96 ⚠️ -8.86
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.501 1.583 ⚠️ +0.08
/error-in-render avg req/sec 1665.06 1579.17 ⚠️ -85.89
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 15.2s 15.2s -65ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +241 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +10 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +10 B
link.js 1.1 MB 1.1 MB ⚠️ +10 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +10 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +10 B
Overall change 5.41 MB 5.41 MB ⚠️ +50 B
Commit: 77cda0c

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 11.7s 11.8s ⚠️ +108ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +680 B
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.364 2.253 -0.11
/ avg req/sec 1057.59 1109.66 +52.07
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.374 1.397 ⚠️ +0.02
/error-in-render avg req/sec 1818.96 1789.27 ⚠️ -29.69
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.2s 13.6s ⚠️ +420ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +680 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +142 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +142 B
link.js 1.1 MB 1.1 MB ⚠️ +142 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +142 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +142 B
Overall change 5.41 MB 5.41 MB ⚠️ +710 B
Commit: ffe2e5d

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Failing test suites

Commit: ffe2e5d

test/integration/handle-non-page-in-pages/test/index.test.js

  • Handle non-page in pages when target: serverless > Fails softly with descriptive error
Expand output

● Handle non-page in pages when target: serverless › Fails softly with descriptive error

expect(received).toMatch(expected)

Expected pattern: /found page without a React Component as default export in/
Received string:  "warn  - Compiled with warnings·
/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/load-components.js
Critical dependency: the request of a dependency is an expression·
/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/load-components.js
Critical dependency: the request of a dependency is an expression·
/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js
Critical dependency: the request of a dependency is an expression·
/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js
Critical dependency: the request of a dependency is an expression·
/home/runner/work/next.js/next.js/packages/next/dist/next-server/server/require.js
Critical dependency: the request of a dependency is an expression··
> Build error occurred
TypeError: ComponentInfo.then is not a function

  6371 |     const ComponentInfo = __webpack_require__("yVyM")
  6372 | 
> 6373 |     const Component = ComponentInfo.default || ComponentInfo.then(mod => mod.default)
       |                                                              ^
  6374 |     /* harmony default export */ __webpack_exports__["default"] = (Component);
  6375 |     const unstable_getStaticParams = ComponentInfo['unstable_getStaticParam' + 's']
  6376 |     const getStaticProps = ComponentInfo['getStaticProp' + 's']

  at Module.vVlQ (integration/handle-non-page-in-pages/.next/serverless/pages/invalid.js:6373:62)
  at __webpack_require__ (integration/handle-non-page-in-pages/.next/serverless/pages/invalid.js:23:31)
  at integration/handle-non-page-in-pages/.next/serverless/pages/invalid.js:91:18
  at Object.<anonymous> (integration/handle-non-page-in-pages/.next/serverless/pages/invalid.js:94:10)
  at hasCustomGetInitialProps (../packages/next/dist/build/utils.js:24:1070)
  at ../packages/next/dist/build/index.js:15:3313
      at runMicrotasks (<anonymous>)
      at async Promise.all (index 0)
  at async build (../packages/next/dist/build/index.js:15:2729)
  "
  at Object.<anonymous> (integration/handle-non-page-in-pages/test/index.test.js:13:20)

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.6s 13.6s ⚠️ +62ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +754 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.578 2.757 ⚠️ +0.18
/ avg req/sec 969.71 906.75 ⚠️ -62.96
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.621 1.667 ⚠️ +0.05
/error-in-render avg req/sec 1542.25 1500.09 ⚠️ -42.16
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 15.3s 15.6s ⚠️ +256ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +754 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +179 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.05 MB ⚠️ +179 B
link.js 1.1 MB 1.1 MB ⚠️ +179 B
routerDirect.js 1.09 MB 1.09 MB ⚠️ +179 B
withRouter.js 1.09 MB 1.09 MB ⚠️ +179 B
Overall change 5.41 MB 5.41 MB ⚠️ +895 B
Commit: 2923ac1

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.1s 12.7s -428ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.72 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.635 2.478 -0.16
/ avg req/sec 948.71 1009 +60.29
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.645 1.484 -0.16
/error-in-render avg req/sec 1519.51 1684.7 +165.19
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB -1 B
link.html gzip 1.01 kB 1.01 kB -1 B
withRouter.html gzip 995 B 995 B
Overall change 3.01 kB 3.01 kB -2 B

Diffs

Diff for main-0e5b0f2..5f.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for main-ceaeaf1..be54dd6a8.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      href="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-ceaeaf1cb88be54dd6a8.js"
+      src="/_next/static/chunks/main-856ffb1c5041f6172a4b.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-0e5b0f2c54131a0cba5f.module.js"
+      src="/_next/static/chunks/main-d932a74383a3fe299ab6.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.4s 15.5s ⚠️ +1.1s
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.72 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-faae5f7..727a.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-7135f33..465e.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-d2ce890..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-26ca3d6..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +979 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +979 B
link.js 1.1 MB 1.1 MB ⚠️ +979 B
routerDirect.js 1.09 MB 1.1 MB ⚠️ +979 B
withRouter.js 1.09 MB 1.1 MB ⚠️ +979 B
Overall change 5.41 MB 5.41 MB ⚠️ +4.89 kB
Commit: 2858570

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Failing test suites

Commit: 7b49567

test/integration/async-modules/test/index.test.js

Expand output

● Test suite failed to run

ReferenceError: Unknown option: .allowAwaitOutsideFunction. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

  at throwUnknownError (../node_modules/@babel/core/lib/config/validation/options.js:123:11)
  at ../node_modules/@babel/core/lib/config/validation/options.js:107:5
      at Array.forEach (<anonymous>)
  at validateNested (../node_modules/@babel/core/lib/config/validation/options.js:83:21)
  at validate (../node_modules/@babel/core/lib/config/validation/options.js:74:10)
  at ../node_modules/@babel/core/lib/config/config-chain.js:174:34
  at cachedFunction (../node_modules/@babel/core/lib/config/caching.js:32:19)
  at buildRootChain (../node_modules/@babel/core/lib/config/config-chain.js:120:36)
  at loadPrivatePartialConfig (../node_modules/@babel/core/lib/config/partial.js:85:55)
  at loadPartialConfig (../node_modules/@babel/core/lib/config/partial.js:110:18)

test/integration/gssp-ssr-change-reloading/test/index.test.js

  • GS(S)P Server-Side Change Reloading > should not reload page when client-side is changed too GSSP
  • GS(S)P Server-Side Change Reloading > should update page when getServerSideProps is changed only
Expand output

● GS(S)P Server-Side Change Reloading › should not reload page when client-side is changed too GSSP

Failed to replace content.

Pattern: change me

Content: export default function Gssp(props) {
  return (
    <>
      <p id="change">changed</p>
      <p id="props">{JSON.stringify(props)}</p>
    </>
  )
}

export const getServerSideProps = ({ params }) => {
  const count = 2

  return {
    props: {
      count,
      params,
      random: Math.random(),
    },
  }
}

  407 |     } else if (typeof pattern === 'string') {
  408 |       if (!currentContent.includes(pattern)) {
> 409 |         throw new Error(
      |               ^
  410 |           `Failed to replace content.\n\nPattern: ${pattern}\n\nContent: ${currentContent}`
  411 |         )
  412 |       }

  at File.replace (lib/next-test-utils.js:409:15)
  at Object.<anonymous> (integration/gssp-ssr-change-reloading/test/index.test.js:154:10)

● GS(S)P Server-Side Change Reloading › should update page when getServerSideProps is changed only

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

Expected: 1
Received: 2

  170 | 
  171 |     const props = JSON.parse(await browser.elementByCss('#props').text())
> 172 |     expect(props.count).toBe(1)
      |                         ^
  173 | 
  174 |     const page = new File(join(appDir, 'pages/gssp-blog/[post].js'))
  175 |     page.replace('count = 1', 'count = 2')

  at Object.<anonymous> (integration/gssp-ssr-change-reloading/test/index.test.js:172:25)

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.8s 14s ⚠️ +131ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.72 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.662 2.668 ⚠️ +0.01
/ avg req/sec 939.11 936.95 ⚠️ -2.16
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.632 1.693 ⚠️ +0.06
/error-in-render avg req/sec 1531.67 1476.99 ⚠️ -54.68
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Diffs

Diff for main-3288e84..dc636e132.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-3f59521..b1.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 15.4s 15.6s ⚠️ +180ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.72 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-3c4b8c3..826a.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-2695ee4..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +979 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +979 B
link.js 1.1 MB 1.1 MB ⚠️ +979 B
routerDirect.js 1.09 MB 1.1 MB ⚠️ +979 B
withRouter.js 1.09 MB 1.1 MB ⚠️ +979 B
Overall change 5.41 MB 5.41 MB ⚠️ +4.89 kB
Commit: 7b49567

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 12.7s 13.2s ⚠️ +535ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.72 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.455 2.29 -0.17
/ avg req/sec 1018.42 1091.83 +73.41
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.355 1.347 -0.01
/error-in-render avg req/sec 1845.22 1856.16 +10.94
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Diffs

Diff for main-3288e84..dc636e132.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-3f59521..b1.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.8s 15.2s ⚠️ +431ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.72 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-3c4b8c3..826a.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-2695ee4..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +979 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +979 B
link.js 1.1 MB 1.1 MB ⚠️ +979 B
routerDirect.js 1.09 MB 1.1 MB ⚠️ +979 B
withRouter.js 1.09 MB 1.1 MB ⚠️ +979 B
Overall change 5.41 MB 5.41 MB ⚠️ +4.89 kB
Commit: 8580c9a

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 12.8s 13.2s ⚠️ +442ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.71 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.357 2.397 ⚠️ +0.04
/ avg req/sec 1060.47 1043.13 ⚠️ -17.34
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.29 1.327 ⚠️ +0.04
/error-in-render avg req/sec 1938.5 1883.48 ⚠️ -55.02
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Diffs

Diff for main-3288e84..dc636e132.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-3f59521..b1.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.6s 14.7s ⚠️ +70ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.71 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-3c4b8c3..826a.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-2695ee4..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.05 MB ⚠️ +977 B
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +977 B
link.js 1.1 MB 1.1 MB ⚠️ +977 B
routerDirect.js 1.09 MB 1.1 MB ⚠️ +977 B
withRouter.js 1.09 MB 1.1 MB ⚠️ +977 B
Overall change 5.41 MB 5.41 MB ⚠️ +4.88 kB
Commit: 3077f5a

@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 13.1s 13.3s ⚠️ +223ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.93 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.373 2.432 ⚠️ +0.06
/ avg req/sec 1053.52 1027.85 ⚠️ -25.67
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.323 1.356 ⚠️ +0.03
/error-in-render avg req/sec 1889.47 1844.04 ⚠️ -45.43
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Diffs

Diff for main-3288e84..dc636e132.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-3f59521..b1.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.8s 15.3s ⚠️ +481ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +2.93 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-3c4b8c3..826a.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-2695ee4..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.06 MB ⚠️ +1.07 kB
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +1.07 kB
link.js 1.1 MB 1.1 MB ⚠️ +1.07 kB
routerDirect.js 1.09 MB 1.1 MB ⚠️ +1.07 kB
withRouter.js 1.09 MB 1.1 MB ⚠️ +1.07 kB
Overall change 5.41 MB 5.41 MB ⚠️ +5.36 kB
Commit: 6446ee4

@Janpot Janpot marked this pull request as ready for review October 12, 2020 13:11
@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 11.5s 12s ⚠️ +535ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +3.09 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.228 2.3 ⚠️ +0.07
/ avg req/sec 1122.22 1086.73 ⚠️ -35.49
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.321 1.482 ⚠️ +0.16
/error-in-render avg req/sec 1892.48 1686.37 ⚠️ -206.11
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Diffs

Diff for main-3288e84..dc636e132.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-3f59521..b1.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 12.9s 13.2s ⚠️ +281ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +3.09 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-3c4b8c3..826a.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-2695ee4..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.06 MB ⚠️ +1.13 kB
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +1.13 kB
link.js 1.1 MB 1.1 MB ⚠️ +1.13 kB
routerDirect.js 1.09 MB 1.1 MB ⚠️ +1.13 kB
withRouter.js 1.09 MB 1.1 MB ⚠️ +1.13 kB
Overall change 5.41 MB 5.41 MB ⚠️ +5.63 kB
Commit: f8615a9

@Janpot Janpot changed the title Allow pages to be async modules Allow pages to be async modules to enable top-level-await Oct 12, 2020
@ijjk
Copy link
Member

ijjk commented Oct 12, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 12.9s 13.6s ⚠️ +640ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +3.09 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js async-modules Change
/ failed reqs 0 0
/ total time (seconds) 2.526 2.401 -0.12
/ avg req/sec 989.67 1041.05 +51.38
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.381 1.374 -0.01
/error-in-render avg req/sec 1810.67 1819.25 +8.58
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB 7.29 kB ⚠️ +76 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB 6.29 kB ⚠️ +11 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js async-modules Change
index.html gzip 1 kB 1 kB
link.html gzip 1.01 kB 1.01 kB
withRouter.html gzip 996 B 996 B
Overall change 3.01 kB 3.01 kB

Diffs

Diff for main-3288e84..dc636e132.js
@@ -1563,6 +1563,10 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
     /***/ zmvN: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
+      var _regeneratorRuntime = __webpack_require__("o0o1");
+
+      var _asyncToGenerator = __webpack_require__("yXPU");
+
       var _classCallCheck = __webpack_require__("lwsE");
 
       var _createClass = __webpack_require__("W8MJ");
@@ -1744,13 +1748,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDependencies",
             value: function getDependencies(route) {
-              var _this = this;
+              var _this2 = this;
 
               return this.promisedBuildManifest.then(function(m) {
                 return m[route]
                   ? m[route].map(function(url) {
                       return ""
-                        .concat(_this.assetPrefix, "/_next/")
+                        .concat(_this2.assetPrefix, "/_next/")
                         .concat(encodeURI(url));
                     })
                   : Promise.reject(pageLoadError(route));
@@ -1764,7 +1768,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "getDataHref",
             value: function getDataHref(href, asPath, ssg, locale) {
-              var _this2 = this;
+              var _this3 = this;
 
               var _ref = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref.pathname,
@@ -1783,7 +1787,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 );
                 return (0, _router.addBasePath)(
                   "/_next/data/"
-                    .concat(_this2.buildId)
+                    .concat(_this3.buildId)
                     .concat(dataRoute)
                     .concat(ssg ? "" : search)
                 );
@@ -1806,7 +1810,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetchData",
             value: function prefetchData(href, asPath, locale) {
-              var _this3 = this;
+              var _this4 = this;
 
               var _ref3 = (0, _parseRelativeUrl.parseRelativeUrl)(href),
                 hrefPathname = _ref3.pathname;
@@ -1816,7 +1820,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 return (
                   // Check if the route requires a data file
                   s.has(route) && // Try to generate data href, noop when falsy
-                  (_dataHref = _this3.getDataHref(
+                  (_dataHref = _this4.getDataHref(
                     href,
                     asPath,
                     true,
@@ -1839,12 +1843,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "loadPage",
             value: function loadPage(route) {
-              var _this4 = this;
+              var _this5 = this;
 
               route = normalizeRoute(route);
               return new Promise(function(resolve, reject) {
                 // If there's a cached version of the page, let's use it.
-                var cachedPage = _this4.pageCache[route];
+                var cachedPage = _this5.pageCache[route];
 
                 if (cachedPage) {
                   if ("error" in cachedPage) {
@@ -1857,9 +1861,9 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                 }
 
                 var fire = function fire(pageToCache) {
-                  _this4.pageRegisterEvents.off(route, fire);
+                  _this5.pageRegisterEvents.off(route, fire);
 
-                  delete _this4.loadingRoutes[route];
+                  delete _this5.loadingRoutes[route];
 
                   if ("error" in pageToCache) {
                     reject(pageToCache.error);
@@ -1868,13 +1872,13 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   }
                 }; // Register a listener to get the page
 
-                _this4.pageRegisterEvents.on(route, fire);
+                _this5.pageRegisterEvents.on(route, fire);
 
-                if (!_this4.loadingRoutes[route]) {
-                  _this4.loadingRoutes[route] = true;
+                if (!_this5.loadingRoutes[route]) {
+                  _this5.loadingRoutes[route] = true;
 
                   if (true) {
-                    _this4
+                    _this5
                       .getDependencies(route)
                       .then(function(deps) {
                         var pending = [];
@@ -1916,7 +1920,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                       ["catch"](function(err) {
                         // Mark the page as failed to load if any of its required scripts
                         // fail to load:
-                        _this4.pageCache[route] = {
+                        _this5.pageCache[route] = {
                           error: err
                         };
                         fire({
@@ -1933,29 +1937,69 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "registerPage",
             value: function registerPage(route, regFn) {
-              var _this5 = this;
+              var _this6 = this;
 
-              var register = function register(styleSheets) {
-                try {
-                  var mod = regFn();
-                  var pageData = {
-                    page: mod["default"] || mod,
-                    mod: mod,
-                    styleSheets: styleSheets
-                  };
-                  _this5.pageCache[route] = pageData;
+              var _this = this;
 
-                  _this5.pageRegisterEvents.emit(route, pageData);
-                } catch (error) {
-                  _this5.pageCache[route] = {
-                    error: error
-                  };
+              var register = /*#__PURE__*/ (function() {
+                var _register = _asyncToGenerator(
+                  /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(
+                    styleSheets
+                  ) {
+                    var mod, pageData;
+                    return _regeneratorRuntime.wrap(
+                      function _callee$(_context) {
+                        while (1) {
+                          switch ((_context.prev = _context.next)) {
+                            case 0:
+                              _context.prev = 0;
+                              _context.next = 3;
+                              return regFn();
+
+                            case 3:
+                              mod = _context.sent;
+                              pageData = {
+                                page: mod["default"] || mod,
+                                mod: mod,
+                                styleSheets: styleSheets
+                              };
+                              _this.pageCache[route] = pageData;
+
+                              _this.pageRegisterEvents.emit(route, pageData);
+
+                              _context.next = 13;
+                              break;
+
+                            case 9:
+                              _context.prev = 9;
+                              _context.t0 = _context["catch"](0);
+                              _this.pageCache[route] = {
+                                error: _context.t0
+                              };
+
+                              _this.pageRegisterEvents.emit(route, {
+                                error: _context.t0
+                              });
+
+                            case 13:
+                            case "end":
+                              return _context.stop();
+                          }
+                        }
+                      },
+                      _callee,
+                      null,
+                      [[0, 9]]
+                    );
+                  })
+                );
 
-                  _this5.pageRegisterEvents.emit(route, {
-                    error: error
-                  });
+                function register(_x) {
+                  return _register.apply(this, arguments);
                 }
-              };
+
+                return register;
+              })();
 
               if (false) {
                 var check;
@@ -2010,11 +2054,11 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                   return register(deps);
                 },
                 function(error) {
-                  _this5.pageCache[route] = {
+                  _this6.pageCache[route] = {
                     error: error
                   };
 
-                  _this5.pageRegisterEvents.emit(route, {
+                  _this6.pageRegisterEvents.emit(route, {
                     error: error
                   });
                 }
@@ -2028,7 +2072,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
           {
             key: "prefetch",
             value: function prefetch(route, isDependency) {
-              var _this6 = this;
+              var _this7 = this;
 
               // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118
               // License: Apache 2.0
@@ -2070,7 +2114,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         this.getDependencies(route).then(function(urls) {
                           return Promise.all(
                             urls.map(function(dependencyUrl) {
-                              return _this6.prefetch(dependencyUrl, true);
+                              return _this7.prefetch(dependencyUrl, true);
                             })
                           );
                         })
Diff for main-3f59521..b1.module.js
@@ -1547,21 +1547,25 @@
         } // This method if called by the route code.
 
         registerPage(route, regFn) {
-          var register = styleSheets => {
+          var _this = this;
+
+          var register = async function register(styleSheets) {
             try {
-              var mod = regFn();
+              var mod = await regFn();
               var pageData = {
                 page: mod.default || mod,
                 mod,
                 styleSheets
               };
-              this.pageCache[route] = pageData;
-              this.pageRegisterEvents.emit(route, pageData);
+              _this.pageCache[route] = pageData;
+
+              _this.pageRegisterEvents.emit(route, pageData);
             } catch (error) {
-              this.pageCache[route] = {
+              _this.pageCache[route] = {
                 error
               };
-              this.pageRegisterEvents.emit(route, {
+
+              _this.pageRegisterEvents.emit(route, {
                 error
               });
             }
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      href="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-3288e8470b4dc636e132.js"
+      src="/_next/static/chunks/main-a62d1e8420d276ea1bfd.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-3f59521eeb32ac7b02b1.module.js"
+      src="/_next/static/chunks/main-e6094095e2520c6a7b15.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
buildDuration 14.8s 15s ⚠️ +134ms
nodeModulesSize 63.4 MB 63.4 MB ⚠️ +3.09 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..133b.js gzip 11.1 kB 11.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-2540b2f..aa10.js gzip 7.22 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-3c4b8c3..826a.js gzip N/A 7.29 kB N/A
Overall change 58 kB 58.1 kB ⚠️ +76 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
677f882d2ed8..dule.js gzip 6.9 kB 6.9 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-0d1e0b8..dule.js gzip 6.28 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-2695ee4..dule.js gzip N/A 6.29 kB N/A
Overall change 52.9 kB 52.9 kB ⚠️ +11 B
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js async-modules Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary Janpot/next.js async-modules Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB 1.32 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.73 kB 7.73 kB
Client Pages Modern
vercel/next.js canary Janpot/next.js async-modules Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-4469a..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-92d3016..dule.js gzip 1.28 kB 1.28 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.37 kB 5.37 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js async-modules Change
_buildManifest.js gzip 323 B 323 B
_buildManife..dule.js gzip 329 B 329 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary Janpot/next.js async-modules Change
_error.js 1.05 MB 1.06 MB ⚠️ +1.13 kB
404.html 4.34 kB 4.34 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.05 MB 1.06 MB ⚠️ +1.13 kB
link.js 1.1 MB 1.1 MB ⚠️ +1.13 kB
routerDirect.js 1.09 MB 1.1 MB ⚠️ +1.13 kB
withRouter.js 1.09 MB 1.1 MB ⚠️ +1.13 kB
Overall change 5.41 MB 5.41 MB ⚠️ +5.63 kB
Commit: 4c13fb7

@timneutkens
Copy link
Member

do we want to enable top-level-await by default when webpack 5 is installed? Or should people configure this themselves in next.config.js?

Given it's experimental in webpack it should not be enabled by default.

@Janpot
Copy link
Contributor Author

Janpot commented Oct 14, 2020

Given it's experimental in webpack it should not be enabled by default.

👍 that's what this PR implements

@timneutkens timneutkens merged commit 9300151 into vercel:canary Oct 14, 2020
@Janpot Janpot deleted the async-modules branch October 14, 2020 10:27
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants