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

Remove _app from with-apollo example #8504

Merged
merged 4 commits into from
Aug 25, 2019

Conversation

HaNdTriX
Copy link
Contributor

@HaNdTriX HaNdTriX commented Aug 24, 2019

Changes

Removes _App.getInitialProps usage from examples/with-apollo

Advantages

  • Automatic static optimization, now works on pages that don't need apollo
  • Adding apollo ssr to a page is now pretty straightforward (e.g.: withApollo(YourPage))

@ijjk
Copy link
Member

ijjk commented Aug 24, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 22.4s 22s -348ms
nodeModulesSize 41.2 MB 41.2 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.38 kB 6.38 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.7 kB 3.7 kB -1 B
index.html gzip 958 B 956 B -2 B
link.html 3.75 kB 3.74 kB -1 B
link.html gzip 965 B 963 B -2 B
withRouter.html 3.75 kB 3.75 kB -1 B
withRouter.html gzip 952 B 950 B -2 B
Overall change -3 B

Diffs

Diff for index.html
@@ -6,9 +6,9 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/index.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/index.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
@@ -16,9 +16,9 @@
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -26,18 +26,18 @@
         <div id="__next">Hello world 👋</div>
         <script id="__NEXT_DATA__" type="application/json"
         crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"GSldbXfReT4WaaZ0aAMer"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"bhDIDTmb9nA6Cee2jgwYC"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/index.js"
+        <script async="" data-next-page="/" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/index.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/index.module.js"
+        <script async="" data-next-page="/" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/index.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -51,15 +51,15 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/Jade05BIwfatdvDbECirMmD+14A=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/WZS0sQYCyX0u4UL3yzBMkX8J9I=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.js"
+        <script src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.module.js"
+        <script src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for link.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/link.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/link.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-756ba2db056401f14f0e.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -29,18 +29,18 @@
             </div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"GSldbXfReT4WaaZ0aAMer"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"bhDIDTmb9nA6Cee2jgwYC"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/link" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/link.js"
+        <script async="" data-next-page="/link" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/link.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/link" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/link.module.js"
+        <script async="" data-next-page="/link" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/link.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/Jade05BIwfatdvDbECirMmD+14A=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/WZS0sQYCyX0u4UL3yzBMkX8J9I=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-8b840fdd1cfe2c0a7144.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-756ba2db056401f14f0e.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.js"
+        <script src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.module.js"
+        <script src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for withRouter.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/withRouter.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/withRouter.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-756ba2db056401f14f0e.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -27,18 +27,18 @@
             <div>I use withRouter</div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"GSldbXfReT4WaaZ0aAMer"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"bhDIDTmb9nA6Cee2jgwYC"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/withRouter.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/withRouter.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/withRouter.module.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/withRouter.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/GSldbXfReT4WaaZ0aAMer/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/Jade05BIwfatdvDbECirMmD+14A=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/WZS0sQYCyX0u4UL3yzBMkX8J9I=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/xUzmpoG8UlSLf0IiH+7sogvw4+k=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/9L6mzKmtpBv6XVC2uQqbvrvRi4U=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-8b840fdd1cfe2c0a7144.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-756ba2db056401f14f0e.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.js"
+        <script src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/GSldbXfReT4WaaZ0aAMer/_buildManifest.module.js"
+        <script src="/_next/static/bhDIDTmb9nA6Cee2jgwYC/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>

Serverless Mode (Decrease detected ✓)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 23.3s 23.5s ⚠️ +199ms
nodeModulesSize 41.2 MB 41.2 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.38 kB 6.38 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB -8 B
_error.js gzip 66.4 kB 66.2 kB -221 B
hooks.html 3.81 kB 3.81 kB -3 B
hooks.html gzip 979 B 975 B -4 B
index.js 248 kB 248 kB -8 B
index.js gzip 66.6 kB 66.6 kB -41 B
link.js 255 kB 255 kB -8 B
link.js gzip 68.8 kB 68.8 kB ⚠️ +11 B
routerDirect.js 249 kB 249 kB -8 B
routerDirect.js gzip 66.7 kB 66.6 kB -162 B
withRouter.js 248 kB 248 kB -8 B
withRouter.js gzip 66.7 kB 66.6 kB -73 B
Overall change -43 B

@Timer Timer added this to the 9.0.6 milestone Aug 24, 2019
Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

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

This is amazing! Thank you @HaNdTriX!

@Timer Timer added ready to land examples Issue/PR related to examples labels Aug 24, 2019
@ijjk
Copy link
Member

ijjk commented Aug 24, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 22.2s 22s -154ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.7 kB 3.7 kB ⚠️ +1 B
index.html gzip 955 B 955 B
link.html 3.74 kB 3.75 kB ⚠️ +1 B
link.html gzip 963 B 963 B
withRouter.html 3.75 kB 3.75 kB ⚠️ +1 B
withRouter.html gzip 950 B 950 B
Overall change ⚠️ +3 B

Diffs

Diff for main-HASH.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for main-HASH.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _app.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "B5Ud":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for hooks.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "+MDD":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for routerDirect.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
Diff for withRouter.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for _app.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for hooks.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "+MDD":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for routerDirect.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
Diff for withRouter.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/index.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/pages/index.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
+        <link rel="preload" href="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -26,40 +26,40 @@
         <div id="__next">Hello world 👋</div>
         <script id="__NEXT_DATA__" type="application/json"
         crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"fOuFwwL8qLQbvpnKRxqUd"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"xqofMcwkGvddDVRReQ513"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/index.js"
+        <script async="" data-next-page="/" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/index.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/index.module.js"
+        <script async="" data-next-page="/" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/index.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
+        <script src="/_next/static/runtime/main-758fcb9b9994c6769dbb.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
+        <script src="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/PJpfXTrYGe6BKt6PiX8nMW8J5Rc=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/d8amOLn74nPfu4pMGVpN90pOQBw=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.js"
+        <script src="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.module.js"
+        <script src="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for link.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/link.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/pages/link.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
+        <link rel="preload" href="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -29,18 +29,18 @@
             </div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"fOuFwwL8qLQbvpnKRxqUd"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"xqofMcwkGvddDVRReQ513"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/link" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/link.js"
+        <script async="" data-next-page="/link" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/link.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/link" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/link.module.js"
+        <script async="" data-next-page="/link" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/link.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/PJpfXTrYGe6BKt6PiX8nMW8J5Rc=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/d8amOLn74nPfu4pMGVpN90pOQBw=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
+        <script src="/_next/static/runtime/main-758fcb9b9994c6769dbb.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
+        <script src="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.js"
+        <script src="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.module.js"
+        <script src="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for withRouter.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/withRouter.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/pages/withRouter.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
+        <link rel="preload" href="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -27,18 +27,18 @@
             <div>I use withRouter</div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"fOuFwwL8qLQbvpnKRxqUd"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"xqofMcwkGvddDVRReQ513"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/withRouter.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/withRouter.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/withRouter.module.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/withRouter.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/xqofMcwkGvddDVRReQ513/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/PJpfXTrYGe6BKt6PiX8nMW8J5Rc=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/d8amOLn74nPfu4pMGVpN90pOQBw=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/vl8p+YJzeJSH+yn3dEVEGGxyps=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/qy3F+sb9JGvEzeLP+w0SzDZAKUE=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
+        <script src="/_next/static/runtime/main-758fcb9b9994c6769dbb.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
+        <script src="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.js"
+        <script src="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/fOuFwwL8qLQbvpnKRxqUd/_buildManifest.module.js"
+        <script src="/_next/static/xqofMcwkGvddDVRReQ513/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>

Serverless Mode (Decrease detected ✓)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 24.2s 23.5s -663ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB -13 B
_error.js gzip 66.4 kB 66.3 kB -125 B
hooks.html 3.81 kB 3.81 kB -4 B
hooks.html gzip 980 B 977 B -3 B
index.js 248 kB 248 kB -13 B
index.js gzip 66.7 kB 66.6 kB -97 B
link.js 255 kB 255 kB -13 B
link.js gzip 68.8 kB 68.9 kB ⚠️ +112 B
routerDirect.js 249 kB 249 kB -13 B
routerDirect.js gzip 66.8 kB 66.7 kB -169 B
withRouter.js 248 kB 248 kB -13 B
withRouter.js gzip 66.6 kB 66.6 kB ⚠️ +18 B
Overall change -69 B

@ijjk
Copy link
Member

ijjk commented Aug 24, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 22.1s 22.4s ⚠️ +301ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB ⚠️ +1 B
main-HASH.js gzip 6.64 kB 6.64 kB ⚠️ +1 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change ⚠️ +1 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB ⚠️ +1 B
main-HASH.module.js gzip 6.37 kB 6.37 kB ⚠️ +1 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change ⚠️ +1 B
Client Pages Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB -1 B
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB -1 B
routerDirect.js 434 B 433 B -1 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change -1 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 805 B 804 B -1 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 430 B 429 B -1 B
withRouter.module.js gzip 293 B 293 B
Overall change -1 B
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.7 kB 3.69 kB -4 B
index.html gzip 956 B 954 B -2 B
link.html 3.75 kB 3.74 kB -4 B
link.html gzip 964 B 962 B -2 B
withRouter.html 3.75 kB 3.75 kB -4 B
withRouter.html gzip 952 B 949 B -3 B
Overall change -12 B

Diffs

Diff for main-HASH.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for main-HASH.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _app.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "B5Ud":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for hooks.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "+MDD":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for routerDirect.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
Diff for withRouter.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for _app.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for hooks.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "+MDD":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for routerDirect.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
Diff for withRouter.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for index.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/index.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/index.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
+        <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -26,40 +26,40 @@
         <div id="__next">Hello world 👋</div>
         <script id="__NEXT_DATA__" type="application/json"
         crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"uQ_ZT3FopJzyGZUDsLXbN"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"_i-bhJTlAROf1T_5R0XNQ"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/index.js"
+        <script async="" data-next-page="/" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/index.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/index.module.js"
+        <script async="" data-next-page="/" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/index.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/runtime/main-758fcb9b9994c6769dbb.js"
+        <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
+        <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/20eXUpJ3Z7+KluYFZcJg41s6JUI=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/gZDC7Q04o+lgRh7vcFhZq6A+JM=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.js"
+        <script src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.module.js"
+        <script src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for link.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/link.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/link.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
+        <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -29,18 +29,18 @@
             </div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"uQ_ZT3FopJzyGZUDsLXbN"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"_i-bhJTlAROf1T_5R0XNQ"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/link" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/link.js"
+        <script async="" data-next-page="/link" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/link.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/link" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/link.module.js"
+        <script async="" data-next-page="/link" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/link.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/20eXUpJ3Z7+KluYFZcJg41s6JUI=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/gZDC7Q04o+lgRh7vcFhZq6A+JM=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/runtime/main-758fcb9b9994c6769dbb.js"
+        <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
+        <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.js"
+        <script src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.module.js"
+        <script src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for withRouter.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/withRouter.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/withRouter.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
+        <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -27,18 +27,18 @@
             <div>I use withRouter</div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"uQ_ZT3FopJzyGZUDsLXbN"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"_i-bhJTlAROf1T_5R0XNQ"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/withRouter.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/withRouter.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/withRouter.module.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/withRouter.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/20eXUpJ3Z7+KluYFZcJg41s6JUI=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/gZDC7Q04o+lgRh7vcFhZq6A+JM=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/tBVFeCBRsTwLwC9l3pQAX4MQtQ=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/Qs368SXSaPIHUYDo1PzM79L31WQ=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/runtime/main-758fcb9b9994c6769dbb.js"
+        <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/runtime/main-57fd58f9724110a1d2ca.module.js"
+        <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.js"
+        <script src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/uQ_ZT3FopJzyGZUDsLXbN/_buildManifest.module.js"
+        <script src="/_next/static/_i-bhJTlAROf1T_5R0XNQ/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>

Serverless Mode (Increase detected ⚠️)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 22.8s 22.5s -386ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB -1 B
main-HASH.js gzip 6.64 kB 6.64 kB -1 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change -1 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB -1 B
main-HASH.module.js gzip 6.37 kB 6.37 kB -1 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change -1 B
Client Pages Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB ⚠️ +1 B
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB ⚠️ +1 B
routerDirect.js 433 B 434 B ⚠️ +1 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change ⚠️ +1 B
Client Pages Modern Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 805 B ⚠️ +1 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 430 B ⚠️ +1 B
withRouter.module.js gzip 293 B 293 B
Overall change ⚠️ +1 B
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB -5 B
_error.js gzip 66.3 kB 66.4 kB ⚠️ +120 B
hooks.html 3.81 kB 3.81 kB -1 B
hooks.html gzip 979 B 977 B -2 B
index.js 248 kB 248 kB -5 B
index.js gzip 66.6 kB 66.7 kB ⚠️ +157 B
link.js 255 kB 255 kB -5 B
link.js gzip 68.9 kB 68.8 kB -46 B
routerDirect.js 249 kB 249 kB -5 B
routerDirect.js gzip 66.7 kB 66.6 kB -170 B
withRouter.js 248 kB 248 kB -5 B
withRouter.js gzip 66.7 kB 66.7 kB ⚠️ +26 B
Overall change -26 B

This allows automatic static optimization for pages, that don’t need apollo.
Name should be same as hoc
@HaNdTriX
Copy link
Contributor Author

HaNdTriX commented Aug 24, 2019

Oh one more thing. File name...

@ijjk
Copy link
Member

ijjk commented Aug 24, 2019

Stats from current PR

Default Server Mode
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 21.2s 21s -144ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.7 kB 3.7 kB
index.html gzip 959 B 954 B -5 B
link.html 3.74 kB 3.74 kB
link.html gzip 967 B 962 B -5 B
withRouter.html 3.75 kB 3.75 kB
withRouter.html gzip 954 B 950 B -4 B
Overall change

Serverless Mode
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 22.7s 23s ⚠️ +325ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB
_error.js gzip 66.4 kB 66.4 kB -10 B
hooks.html 3.81 kB 3.81 kB
hooks.html gzip 979 B 981 B ⚠️ +2 B
index.js 248 kB 248 kB
index.js gzip 66.6 kB 66.7 kB ⚠️ +160 B
link.js 255 kB 255 kB
link.js gzip 68.8 kB 68.8 kB -72 B
routerDirect.js 249 kB 249 kB
routerDirect.js gzip 66.6 kB 66.8 kB ⚠️ +180 B
withRouter.js 248 kB 248 kB
withRouter.js gzip 66.6 kB 66.6 kB -38 B
Overall change

@ijjk
Copy link
Member

ijjk commented Aug 24, 2019

Stats from current PR

Default Server Mode
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 22.6s 23.4s ⚠️ +824ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.7 kB 3.7 kB
index.html gzip 957 B 958 B ⚠️ +1 B
link.html 3.75 kB 3.75 kB
link.html gzip 964 B 966 B ⚠️ +2 B
withRouter.html 3.75 kB 3.75 kB
withRouter.html gzip 951 B 953 B ⚠️ +2 B
Overall change

Serverless Mode (Decrease detected ✓)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 24.5s 24.4s -114ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB -5 B
_error.js gzip 66.3 kB 66.4 kB ⚠️ +106 B
hooks.html 3.81 kB 3.81 kB -1 B
hooks.html gzip 980 B 980 B
index.js 248 kB 248 kB -5 B
index.js gzip 66.8 kB 66.5 kB -279 B
link.js 255 kB 255 kB -5 B
link.js gzip 68.8 kB 68.8 kB -38 B
routerDirect.js 249 kB 249 kB -5 B
routerDirect.js gzip 66.7 kB 66.7 kB ⚠️ +8 B
withRouter.js 248 kB 248 kB -5 B
withRouter.js gzip 66.7 kB 66.6 kB -185 B
Overall change -26 B

@kachkaev
Copy link
Contributor

kachkaev commented Aug 24, 2019

Hey @HaNdTriX 👋 Thanks for this PR!

I'd like to ask you a couple of things given the opportunity since you've had some hands-on with this example. 🙂

  1. Have you checked if navigating between withApollo(IndexPage) and withApollo(SomeOtherPage) maintains the internal state of the apollo provider and does not create a new instance of it?

  2. WDYT of merging lib/init-apollo.js and lib/with-apollo.js into one file (say, lib/apollo.js)? Would not it be easier to copy-paste parts of this example if there were fewer files?

@ijjk
Copy link
Member

ijjk commented Aug 24, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 21.4s 21.7s ⚠️ +362ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.69 kB 3.69 kB ⚠️ +3 B
index.html gzip 951 B 953 B ⚠️ +2 B
link.html 3.74 kB 3.74 kB ⚠️ +3 B
link.html gzip 959 B 960 B ⚠️ +1 B
withRouter.html 3.75 kB 3.75 kB ⚠️ +3 B
withRouter.html gzip 947 B 948 B ⚠️ +1 B
Overall change ⚠️ +9 B

Diffs

Diff for index.html
@@ -6,9 +6,9 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/index.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/pages/index.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
@@ -16,9 +16,9 @@
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -26,18 +26,18 @@
         <div id="__next">Hello world 👋</div>
         <script id="__NEXT_DATA__" type="application/json"
         crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"MJ6t2Aan5n5CL_Ea-8hIG"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"_ZfJibXsNYT397NwuO09F"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/index.js"
+        <script async="" data-next-page="/" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/index.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/index.module.js"
+        <script async="" data-next-page="/" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/index.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -51,15 +51,15 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/K8bnmd7BBtc6iRG0WxB7YgbcTOI=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/hg4T9ucLknD6leEUJicbVH9hrLQ=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.js"
+        <script src="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.module.js"
+        <script src="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for link.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/link.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/pages/link.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -29,18 +29,18 @@
             </div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"MJ6t2Aan5n5CL_Ea-8hIG"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"_ZfJibXsNYT397NwuO09F"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/link" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/link.js"
+        <script async="" data-next-page="/link" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/link.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/link" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/link.module.js"
+        <script async="" data-next-page="/link" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/link.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/K8bnmd7BBtc6iRG0WxB7YgbcTOI=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/hg4T9ucLknD6leEUJicbVH9hrLQ=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.js"
+        <script src="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.module.js"
+        <script src="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for withRouter.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/withRouter.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/pages/withRouter.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.72ab6ea1ebeafbd8c735.module.js"
+        <link rel="preload" href="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.72ab6ea1ebeafbd8c735.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -27,18 +27,18 @@
             <div>I use withRouter</div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"MJ6t2Aan5n5CL_Ea-8hIG"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"_ZfJibXsNYT397NwuO09F"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/withRouter.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/withRouter.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/withRouter.module.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/withRouter.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/_ZfJibXsNYT397NwuO09F/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/K8bnmd7BBtc6iRG0WxB7YgbcTOI=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/hg4T9ucLknD6leEUJicbVH9hrLQ=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.c99adde05e467047c83e.js"
+        <script src="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.c99adde05e467047c83e.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/BVoW3TGIpfPwS4M4e8EaNsLJ4=.72ab6ea1ebeafbd8c735.module.js"
+        <script src="/_next/static/chunks/gXX7rFmTiuIBVpnQsSfyedN3knY=.72ab6ea1ebeafbd8c735.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-97617d800ec2b207a20a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-9c0b8b62a2fb27af35b2.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.js"
+        <script src="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/MJ6t2Aan5n5CL_Ea-8hIG/_buildManifest.module.js"
+        <script src="/_next/static/_ZfJibXsNYT397NwuO09F/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>

Serverless Mode (Increase detected ⚠️)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 23.6s 24s ⚠️ +363ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall increase ⚠️
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB ⚠️ +8 B
_error.js gzip 66.5 kB 66.3 kB -178 B
hooks.html 3.81 kB 3.81 kB ⚠️ +3 B
hooks.html gzip 980 B 979 B -1 B
index.js 248 kB 248 kB ⚠️ +8 B
index.js gzip 66.5 kB 66.8 kB ⚠️ +267 B
link.js 255 kB 255 kB ⚠️ +8 B
link.js gzip 68.8 kB 68.9 kB ⚠️ +42 B
routerDirect.js 249 kB 249 kB ⚠️ +8 B
routerDirect.js gzip 66.9 kB 66.8 kB -27 B
withRouter.js 248 kB 248 kB ⚠️ +8 B
withRouter.js gzip 66.8 kB 66.7 kB -146 B
Overall change ⚠️ +43 B

@ijjk
Copy link
Member

ijjk commented Aug 25, 2019

Stats from current PR

Default Server Mode
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 21.1s 21.4s ⚠️ +299ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
index.html 3.7 kB 3.7 kB
index.html gzip 959 B 955 B -4 B
link.html 3.75 kB 3.75 kB
link.html gzip 966 B 963 B -3 B
withRouter.html 3.75 kB 3.75 kB
withRouter.html gzip 954 B 950 B -4 B
Overall change

Serverless Mode (Decrease detected ✓)
General
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
buildDuration 23s 22.4s -690ms
nodeModulesSize 41.3 MB 41.3 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.37 kB 6.37 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 434 B 434 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 805 B 805 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 430 B 430 B
withRouter.module.js gzip 293 B 293 B
Overall change
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall decrease ✓
zeit/next.js canary HaNdTriX/next.js example/remove-app-apollo Change
_error.js 247 kB 247 kB -3 B
_error.js gzip 66.3 kB 66.2 kB -102 B
hooks.html 3.81 kB 3.81 kB -2 B
hooks.html gzip 978 B 975 B -3 B
index.js 248 kB 248 kB -3 B
index.js gzip 66.6 kB 66.7 kB ⚠️ +181 B
link.js 255 kB 255 kB -3 B
link.js gzip 68.8 kB 68.7 kB -129 B
routerDirect.js 249 kB 249 kB -3 B
routerDirect.js gzip 66.7 kB 66.6 kB -58 B
withRouter.js 248 kB 248 kB -3 B
withRouter.js gzip 66.7 kB 66.8 kB ⚠️ +138 B
Overall change -17 B

@Timer Timer merged commit 17b1154 into vercel:canary Aug 25, 2019
@HaNdTriX
Copy link
Contributor Author

HaNdTriX commented Aug 25, 2019

@kachkaev thanks for your Feedback! 🙏

Have you checked if navigating between withApollo(IndexPage) and withApollo(SomeOtherPage) maintains the internal state of the apollo provider and does not create a new instance of it?

yes! The HOC just provides the apollo context that is created or reused by initApollo/createClient

WDYT of merging lib/init-apollo.js and lib/with-apollo.js into one file (say, lib/apollo.js)? Would not it be easier to copy-paste parts of this example if there were fewer files?

Definitely. Lets change this in another PR. @Timer already merged this one. (#8508)

@HaNdTriX HaNdTriX deleted the example/remove-app-apollo branch August 25, 2019 18:22
@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants