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 @next plugins to be loaded without experimental flag #18788

Closed

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Nov 4, 2020

Blocked on landing #18673

This allows Next.js plugins scoped with @next (official plugins) to be loaded automatically.

This does not include the loading system for external (unofficial) plugins given we're still refining the plugin system.

@ijjk
Copy link
Member

ijjk commented Nov 4, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
buildDuration 13.1s 13.7s ⚠️ +575ms
nodeModulesSize 90.5 MB 90.5 MB -2.42 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
/ failed reqs 0 0
/ total time (seconds) 2.595 2.608 ⚠️ +0.01
/ avg req/sec 963.39 958.44 ⚠️ -4.95
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.541 1.567 ⚠️ +0.03
/error-in-render avg req/sec 1622.02 1595.47 ⚠️ -26.55
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..1f3c.js gzip 11.2 kB 11.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-be398bc..d262.js gzip 7.33 kB 7.45 kB ⚠️ +117 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.4 kB ⚠️ +117 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..dule.js gzip 7.02 kB 7.02 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-378f0c6..dule.js gzip 6.33 kB 6.43 kB ⚠️ +106 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.2 kB ⚠️ +106 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
polyfills-b5..1119.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a674d88..ccde.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a4469f3..dule.js gzip 1.32 kB 1.32 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.41 kB 5.41 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
index.html gzip 1 kB 1 kB ⚠️ +2 B
link.html gzip 1.01 kB 1.01 kB ⚠️ +1 B
withRouter.html gzip 994 B 995 B ⚠️ +1 B
Overall change 3 kB 3 kB ⚠️ +4 B

Diffs

Diff for main-effcb00..a6.module.js
@@ -45,6 +45,23 @@
       /***/
     },
 
+    /***/ Agzn: /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ BMP1: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -504,7 +521,24 @@
           }
         ); // call init-client middleware
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(() =>
+              (0, _interopRequireWildcard2.default)(__webpack_require__("TO/1"))
+            )
+            .then(initClientModule => {
+              return initClientModule.default({
+                router
+              });
+            })
+            .catch(initClientErr => {
+              console.error(
+                "Error calling client-init for plugins",
+                initClientErr
+              );
+            });
         }
 
         var renderCtx = {
@@ -558,7 +592,24 @@
         if (false) {
         }
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(() =>
+              (0, _interopRequireWildcard2.default)(__webpack_require__("Agzn"))
+            )
+            .then(onClientErrorModule => {
+              return onClientErrorModule.default({
+                err
+              });
+            })
+            .catch(onClientErrorErr => {
+              console.error(
+                "error calling on-error-client for plugins",
+                onClientErrorErr
+              );
+            });
         } // Make sure we log the error to the console, otherwise users can't track down issues.
 
         console.error(err);
@@ -923,6 +974,23 @@
       /***/
     },
 
+    /***/ "TO/1": /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ bGXG: /***/ function(module, exports, __webpack_require__) {
       "use strict";
Diff for main-f5ebb63..f5b26cfc4.js
@@ -70,6 +70,23 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ Agzn: /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ BMP1: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -699,7 +716,27 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         }
                       ); // call init-client middleware
 
-                      if (false) {
+                      if (true) {
+                        // @ts-ignore
+                        // eslint-disable-next-line
+                        Promise.resolve()
+                          .then(function() {
+                            return (0,
+                            _interopRequireWildcard2[
+                              "default"
+                            ])(__webpack_require__("TO/1"));
+                          })
+                          .then(function(initClientModule) {
+                            return initClientModule["default"]({
+                              router: router
+                            });
+                          })
+                          ["catch"](function(initClientErr) {
+                            console.error(
+                              "Error calling client-init for plugins",
+                              initClientErr
+                            );
+                          });
                       }
 
                       renderCtx = {
@@ -824,7 +861,25 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         if (false) {
         }
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(function() {
+              return (0,
+              _interopRequireWildcard2["default"])(__webpack_require__("Agzn"));
+            })
+            .then(function(onClientErrorModule) {
+              return onClientErrorModule["default"]({
+                err: err
+              });
+            })
+            ["catch"](function(onClientErrorErr) {
+              console.error(
+                "error calling on-error-client for plugins",
+                onClientErrorErr
+              );
+            });
         } // Make sure we log the error to the console, otherwise users can't track down issues.
 
         console.error(err);
@@ -1244,6 +1299,23 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ "TO/1": /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ a1gu: /***/ function(module, exports, __webpack_require__) {
       var _typeof = __webpack_require__("cDf5");
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      href="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-769ffb30946627a111d3.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-f5ebb63d54ef5b26cfc4.js"
+      src="/_next/static/chunks/main-47e35023bf38d59f8aa0.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      src="/_next/static/chunks/main-88e9c030b693e5296cf5.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-effcb009cbf210ace9a6.module.js"
+      href="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-769ffb30946627a111d3.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-f5ebb63d54ef5b26cfc4.js"
+      src="/_next/static/chunks/main-47e35023bf38d59f8aa0.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      src="/_next/static/chunks/main-88e9c030b693e5296cf5.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-effcb009cbf210ace9a6.module.js"
+      href="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-769ffb30946627a111d3.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-f5ebb63d54ef5b26cfc4.js"
+      src="/_next/static/chunks/main-47e35023bf38d59f8aa0.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      src="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
buildDuration 15.1s 15s -86ms
nodeModulesSize 90.5 MB 90.5 MB -2.42 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..1f3c.js gzip 11.2 kB 11.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-be398bc..d262.js gzip 7.33 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-5ae10ff..3151.js gzip N/A 7.45 kB N/A
Overall change 58.3 kB 58.4 kB ⚠️ +117 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..dule.js gzip 7.02 kB 7.02 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-378f0c6..dule.js gzip 6.33 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-950a612..dule.js gzip N/A 6.43 kB N/A
Overall change 53.1 kB 53.2 kB ⚠️ +106 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
polyfills-b5..1119.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a674d88..ccde.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a4469f3..dule.js gzip 1.32 kB 1.32 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.41 kB 5.41 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_error.js 1.07 MB 1.07 MB ⚠️ +357 B
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.07 MB 1.07 MB ⚠️ +357 B
link.js 1.12 MB 1.12 MB ⚠️ +357 B
routerDirect.js 1.11 MB 1.11 MB ⚠️ +357 B
withRouter.js 1.11 MB 1.11 MB ⚠️ +357 B
Overall change 5.48 MB 5.48 MB ⚠️ +1.78 kB
Commit: 959c1a1

@ijjk
Copy link
Member

ijjk commented Nov 4, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
buildDuration 12.2s 12.5s ⚠️ +271ms
nodeModulesSize 90.5 MB 90.5 MB -2.42 kB
Page Load Tests Overall increase ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
/ failed reqs 0 0
/ total time (seconds) 2.317 2.301 -0.02
/ avg req/sec 1079.12 1086.32 +7.2
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.254 1.216 -0.04
/error-in-render avg req/sec 1993.93 2055.69 +61.76
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..1f3c.js gzip 11.2 kB 11.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-be398bc..d262.js gzip 7.33 kB 7.45 kB ⚠️ +117 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.3 kB 58.4 kB ⚠️ +117 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..dule.js gzip 7.02 kB 7.02 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-378f0c6..dule.js gzip 6.33 kB 6.43 kB ⚠️ +106 B
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 53.1 kB 53.2 kB ⚠️ +106 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
polyfills-b5..1119.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a674d88..ccde.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a4469f3..dule.js gzip 1.32 kB 1.32 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.41 kB 5.41 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
index.html gzip 1 kB 1 kB ⚠️ +2 B
link.html gzip 1.01 kB 1.01 kB ⚠️ +1 B
withRouter.html gzip 994 B 995 B ⚠️ +1 B
Overall change 3 kB 3 kB ⚠️ +4 B

Diffs

Diff for main-effcb00..a6.module.js
@@ -45,6 +45,23 @@
       /***/
     },
 
+    /***/ Agzn: /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ BMP1: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -504,7 +521,24 @@
           }
         ); // call init-client middleware
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(() =>
+              (0, _interopRequireWildcard2.default)(__webpack_require__("TO/1"))
+            )
+            .then(initClientModule => {
+              return initClientModule.default({
+                router
+              });
+            })
+            .catch(initClientErr => {
+              console.error(
+                "Error calling client-init for plugins",
+                initClientErr
+              );
+            });
         }
 
         var renderCtx = {
@@ -558,7 +592,24 @@
         if (false) {
         }
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(() =>
+              (0, _interopRequireWildcard2.default)(__webpack_require__("Agzn"))
+            )
+            .then(onClientErrorModule => {
+              return onClientErrorModule.default({
+                err
+              });
+            })
+            .catch(onClientErrorErr => {
+              console.error(
+                "error calling on-error-client for plugins",
+                onClientErrorErr
+              );
+            });
         } // Make sure we log the error to the console, otherwise users can't track down issues.
 
         console.error(err);
@@ -923,6 +974,23 @@
       /***/
     },
 
+    /***/ "TO/1": /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ bGXG: /***/ function(module, exports, __webpack_require__) {
       "use strict";
Diff for main-f5ebb63..f5b26cfc4.js
@@ -70,6 +70,23 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ Agzn: /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ BMP1: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -699,7 +716,27 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         }
                       ); // call init-client middleware
 
-                      if (false) {
+                      if (true) {
+                        // @ts-ignore
+                        // eslint-disable-next-line
+                        Promise.resolve()
+                          .then(function() {
+                            return (0,
+                            _interopRequireWildcard2[
+                              "default"
+                            ])(__webpack_require__("TO/1"));
+                          })
+                          .then(function(initClientModule) {
+                            return initClientModule["default"]({
+                              router: router
+                            });
+                          })
+                          ["catch"](function(initClientErr) {
+                            console.error(
+                              "Error calling client-init for plugins",
+                              initClientErr
+                            );
+                          });
                       }
 
                       renderCtx = {
@@ -824,7 +861,25 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         if (false) {
         }
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(function() {
+              return (0,
+              _interopRequireWildcard2["default"])(__webpack_require__("Agzn"));
+            })
+            .then(function(onClientErrorModule) {
+              return onClientErrorModule["default"]({
+                err: err
+              });
+            })
+            ["catch"](function(onClientErrorErr) {
+              console.error(
+                "error calling on-error-client for plugins",
+                onClientErrorErr
+              );
+            });
         } // Make sure we log the error to the console, otherwise users can't track down issues.
 
         console.error(err);
@@ -1244,6 +1299,23 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ "TO/1": /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ a1gu: /***/ function(module, exports, __webpack_require__) {
       var _typeof = __webpack_require__("cDf5");
Diff for index.html
@@ -6,7 +6,7 @@
     <noscript data-n-css="true"></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      href="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-769ffb30946627a111d3.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-f5ebb63d54ef5b26cfc4.js"
+      src="/_next/static/chunks/main-47e35023bf38d59f8aa0.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      src="/_next/static/chunks/main-88e9c030b693e5296cf5.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-effcb009cbf210ace9a6.module.js"
+      href="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -90,13 +90,13 @@
       src="/_next/static/chunks/polyfills-769ffb30946627a111d3.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-f5ebb63d54ef5b26cfc4.js"
+      src="/_next/static/chunks/main-47e35023bf38d59f8aa0.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      src="/_next/static/chunks/main-88e9c030b693e5296cf5.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-effcb009cbf210ace9a6.module.js"
+      href="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -85,13 +85,13 @@
       src="/_next/static/chunks/polyfills-769ffb30946627a111d3.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-f5ebb63d54ef5b26cfc4.js"
+      src="/_next/static/chunks/main-47e35023bf38d59f8aa0.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/main-effcb009cbf210ace9a6.module.js"
+      src="/_next/static/chunks/main-88e9c030b693e5296cf5.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
buildDuration 14.1s 14.3s ⚠️ +208ms
nodeModulesSize 90.5 MB 90.5 MB -2.42 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..1f3c.js gzip 11.2 kB 11.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-be398bc..d262.js gzip 7.33 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-5ae10ff..3151.js gzip N/A 7.45 kB N/A
Overall change 58.3 kB 58.4 kB ⚠️ +117 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..dule.js gzip 7.02 kB 7.02 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-378f0c6..dule.js gzip 6.33 kB N/A N/A
webpack-07c5..dule.js gzip 751 B 751 B
main-950a612..dule.js gzip N/A 6.43 kB N/A
Overall change 53.1 kB 53.2 kB ⚠️ +106 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
polyfills-b5..1119.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a674d88..ccde.js gzip 1.35 kB 1.35 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.75 kB 7.75 kB
Client Pages Modern
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins 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-a4469f3..dule.js gzip 1.32 kB 1.32 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.41 kB 5.41 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_error.js 1.07 MB 1.07 MB ⚠️ +357 B
404.html 4.73 kB 4.73 kB
hooks.html 3.92 kB 3.92 kB
index.js 1.07 MB 1.07 MB ⚠️ +357 B
link.js 1.12 MB 1.12 MB ⚠️ +357 B
routerDirect.js 1.11 MB 1.11 MB ⚠️ +357 B
withRouter.js 1.11 MB 1.11 MB ⚠️ +357 B
Overall change 5.48 MB 5.48 MB ⚠️ +1.78 kB
Commit: df27e98

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

# Conflicts:
#	packages/next/build/webpack-config.ts
#	packages/next/build/webpack/loaders/next-babel-loader.js
#	packages/next/next-server/server/config.ts
@vercel vercel bot temporarily deployed to Preview December 1, 2020 17:14 Inactive
@vercel vercel bot temporarily deployed to Preview December 1, 2020 17:15 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 1, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
buildDuration 9.6s 9.4s -173ms
nodeModulesSize 85 MB 85 MB -2.43 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
/ failed reqs 0 0
/ total time (seconds) 1.995 2.105 ⚠️ +0.11
/ avg req/sec 1253.14 1187.6 ⚠️ -65.54
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.173 1.172 0
/error-in-render avg req/sec 2130.56 2133.6 +3.04
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-90b3d5a..55ad.js gzip 6.54 kB 6.67 kB ⚠️ +132 B
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59.2 kB ⚠️ +132 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Diffs

Diff for main-eaa8900..73c89664d.js
@@ -70,6 +70,23 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ Agzn: /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ BMP1: /***/ function(module, exports, __webpack_require__) {
       "use strict";
 
@@ -718,7 +735,27 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
                         }
                       ); // call init-client middleware
 
-                      if (false) {
+                      if (true) {
+                        // @ts-ignore
+                        // eslint-disable-next-line
+                        Promise.resolve()
+                          .then(function() {
+                            return (0,
+                            _interopRequireWildcard2[
+                              "default"
+                            ])(__webpack_require__("TO/1"));
+                          })
+                          .then(function(initClientModule) {
+                            return initClientModule["default"]({
+                              router: router
+                            });
+                          })
+                          ["catch"](function(initClientErr) {
+                            console.error(
+                              "Error calling client-init for plugins",
+                              initClientErr
+                            );
+                          });
                       }
 
                       renderCtx = {
@@ -843,7 +880,25 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         if (false) {
         }
 
-        if (false) {
+        if (true) {
+          // @ts-ignore
+          // eslint-disable-next-line
+          Promise.resolve()
+            .then(function() {
+              return (0,
+              _interopRequireWildcard2["default"])(__webpack_require__("Agzn"));
+            })
+            .then(function(onClientErrorModule) {
+              return onClientErrorModule["default"]({
+                err: err
+              });
+            })
+            ["catch"](function(onClientErrorErr) {
+              console.error(
+                "error calling on-error-client for plugins",
+                onClientErrorErr
+              );
+            });
         } // Make sure we log the error to the console, otherwise users can't track down issues.
 
         console.error(err);
@@ -1266,6 +1321,23 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ "TO/1": /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+
+      /* harmony default export */ __webpack_exports__["default"] = function(
+        ctx
+      ) {
+        return Promise.all([]);
+      };
+
+      /***/
+    },
+
     /***/ a1gu: /***/ function(module, exports, __webpack_require__) {
       var _typeof = __webpack_require__("cDf5");
Diff for index.html
@@ -7,7 +7,7 @@
     <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-eaa8900178673c89664d.js"
+      href="/_next/static/chunks/main-9335e28f1ce3aa44795a.js"
       as="script"
     />
     <link
@@ -53,7 +53,7 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-eaa8900178673c89664d.js"
+      src="/_next/static/chunks/main-9335e28f1ce3aa44795a.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -7,7 +7,7 @@
     <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-eaa8900178673c89664d.js"
+      href="/_next/static/chunks/main-9335e28f1ce3aa44795a.js"
       as="script"
     />
     <link
@@ -58,7 +58,7 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-eaa8900178673c89664d.js"
+      src="/_next/static/chunks/main-9335e28f1ce3aa44795a.js"
       async=""
     ></script>
     <script
Diff for withRouter.html
@@ -7,7 +7,7 @@
     <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-eaa8900178673c89664d.js"
+      href="/_next/static/chunks/main-9335e28f1ce3aa44795a.js"
       as="script"
     />
     <link
@@ -53,7 +53,7 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-eaa8900178673c89664d.js"
+      src="/_next/static/chunks/main-9335e28f1ce3aa44795a.js"
       async=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
buildDuration 11.2s 11.2s -31ms
nodeModulesSize 85 MB 85 MB -2.43 kB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-90b3d5a..55ad.js gzip 6.54 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
main-9812f04..862e.js gzip N/A 6.67 kB N/A
Overall change 59 kB 59.2 kB ⚠️ +132 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/stable-builtin-plugins Change
_error.js 996 kB 996 kB ⚠️ +357 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 996 kB 996 kB ⚠️ +357 B
link.js 1.05 MB 1.05 MB ⚠️ +357 B
routerDirect.js 1.04 MB 1.04 MB ⚠️ +357 B
withRouter.js 1.04 MB 1.04 MB ⚠️ +357 B
Overall change 5.13 MB 5.14 MB ⚠️ +1.78 kB
Commit: 5ff9eb8

@ijjk
Copy link
Member

ijjk commented Dec 1, 2020

Failing test suites

Commit: 5ff9eb8

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

   96 | 
   97 |       // should be no bigger than 61.8 kb
>  98 |       expect(parseFloat(indexFirstLoad) - 62).toBeLessThanOrEqual(0)
      |                                               ^
   99 |       expect(indexFirstLoad.endsWith('kB')).toBe(true)
  100 | 
  101 |       expect(parseFloat(err404Size) - 3.6).toBeLessThanOrEqual(0)

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

@Timer
Copy link
Member

Timer commented Jan 8, 2021

Closing in favor of #20759

@Timer Timer closed this Jan 8, 2021
@timneutkens timneutkens deleted the add/stable-builtin-plugins branch February 12, 2021 13:33
@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.

3 participants