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

Delay hydration until after page is visible in development #10164

Merged
merged 3 commits into from Jan 20, 2020

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Jan 19, 2020

Since in development we currently hide the body until styles are loaded this can cause refs to differ in initial values between production and development. As discussed with @Timer to help prevent this differing we can instead delay hydrating until the styles have been applied in development.

This also adds a test case from the initial issue to make sure we don't regress on this

Fixes: #10163

@ijjk ijjk added the kind: bug Confirmed bug that is on the backlog label Jan 19, 2020
@ijjk ijjk added this to the 9.2.1 milestone Jan 19, 2020
@ijjk
Copy link
Member Author

ijjk commented Jan 19, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
buildDuration 13.7s 13.7s -35ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +506 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.js gzip 5.11 kB 5.13 kB ⚠️ +26 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..fffc.js gzip 13.7 kB 13.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +26 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.module.js gzip 4.17 kB 4.16 kB -6 B
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB -6 B
Legacy Client Bundles (polyfills)
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.js gzip 1.34 kB 1.34 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.module.js gzip 769 B 769 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.42 kB 7.42 kB
Client Build Manifests
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
index.html gzip 1.02 kB 1.02 kB -1 B
link.html gzip 1.03 kB 1.03 kB -3 B
withRouter.html gzip 1.02 kB 1.02 kB
Overall change 3.07 kB 3.06 kB -4 B

Diffs

Diff for main-HASH.js
@@ -675,10 +675,22 @@
                           props: props,
                           err: initialErr,
                         }
+
+                        if (false) {
+                        }
+
                         render(renderCtx)
-                        return _context.abrupt('return', emitter)
+                        _context.next = 34
+                        break
+
+                      case 33:
+                        return _context.abrupt('return', {
+                          emitter: emitter,
+                          render: render,
+                          renderCtx: renderCtx,
+                        })
 
-                      case 31:
+                      case 34:
                       case 'end':
                         return _context.stop()
                     }
Diff for main-HASH.module.js
@@ -481,8 +481,11 @@
               props,
               err: initialErr,
             }
-            render(renderCtx)
-            return emitter
+
+            if (true) {
+              render(renderCtx)
+            } else {
+            }
           })
 
           return function(_x) {
Diff for index.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      href="/_next/static/runtime/main-bf01af45b3cd6ab56485.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -163,13 +163,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-ede742ad5242298fdc66.js"
+      src="/_next/static/runtime/main-eff3b1b80f58ee0f525d.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      src="/_next/static/runtime/main-bf01af45b3cd6ab56485.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      href="/_next/static/runtime/main-bf01af45b3cd6ab56485.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -168,13 +168,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-ede742ad5242298fdc66.js"
+      src="/_next/static/runtime/main-eff3b1b80f58ee0f525d.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      src="/_next/static/runtime/main-bf01af45b3cd6ab56485.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      href="/_next/static/runtime/main-bf01af45b3cd6ab56485.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -163,13 +163,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-ede742ad5242298fdc66.js"
+      src="/_next/static/runtime/main-eff3b1b80f58ee0f525d.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      src="/_next/static/runtime/main-bf01af45b3cd6ab56485.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
buildDuration 14.4s 14.7s ⚠️ +286ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +506 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.js gzip 5.11 kB 5.13 kB ⚠️ +26 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..fffc.js gzip 13.7 kB 13.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +26 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.module.js gzip 4.17 kB 4.16 kB -6 B
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB -6 B
Legacy Client Bundles (polyfills)
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.js gzip 1.34 kB 1.34 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.module.js gzip 769 B 769 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.42 kB 7.42 kB
Client Build Manifests
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Serverless bundles Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_error.js gzip 70.9 kB 70.9 kB -1 B
hooks.html gzip 1.05 kB 1.05 kB
index.js gzip 71.3 kB 71.3 kB -1 B
link.js gzip 80.6 kB 80.6 kB -1 B
routerDirect.js gzip 78.2 kB 78.2 kB -1 B
withRouter.js gzip 78.3 kB 78.3 kB -1 B
Overall change 380 kB 380 kB -5 B

Commit: 057fcf1

@ijjk
Copy link
Member Author

ijjk commented Jan 19, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
buildDuration 14.2s 14s -180ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +616 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.js gzip 5.11 kB 5.12 kB ⚠️ +9 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..fffc.js gzip 13.7 kB 13.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +9 B
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.module.js gzip 4.17 kB 4.17 kB
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.js gzip 1.34 kB 1.34 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.module.js gzip 769 B 769 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.42 kB 7.42 kB
Client Build Manifests
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
index.html gzip 1.02 kB 1.02 kB -2 B
link.html gzip 1.03 kB 1.03 kB -3 B
withRouter.html gzip 1.02 kB 1.02 kB
Overall change 3.07 kB 3.06 kB -5 B

Diffs

Diff for main-HASH.js
@@ -675,10 +675,26 @@
                           props: props,
                           err: initialErr,
                         }
+
+                        if (false) {
+                        }
+
                         render(renderCtx)
                         return _context.abrupt('return', emitter)
 
-                      case 31:
+                      case 32:
+                        if (true) {
+                          _context.next = 34
+                          break
+                        }
+
+                        return _context.abrupt('return', {
+                          emitter: emitter,
+                          render: render,
+                          renderCtx: renderCtx,
+                        })
+
+                      case 34:
                       case 'end':
                         return _context.stop()
                     }
Diff for main-HASH.module.js
@@ -481,8 +481,14 @@
               props,
               err: initialErr,
             }
-            render(renderCtx)
-            return emitter
+
+            if (true) {
+              render(renderCtx)
+              return emitter
+            }
+
+            if (false) {
+            }
           })
 
           return function(_x) {
Diff for index.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      href="/_next/static/runtime/main-901e52f5bd00f3082138.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -163,13 +163,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-ede742ad5242298fdc66.js"
+      src="/_next/static/runtime/main-e0fc5b9bc2bdb3c37c49.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      src="/_next/static/runtime/main-901e52f5bd00f3082138.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      href="/_next/static/runtime/main-901e52f5bd00f3082138.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -168,13 +168,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-ede742ad5242298fdc66.js"
+      src="/_next/static/runtime/main-e0fc5b9bc2bdb3c37c49.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      src="/_next/static/runtime/main-901e52f5bd00f3082138.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      href="/_next/static/runtime/main-901e52f5bd00f3082138.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -163,13 +163,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-ede742ad5242298fdc66.js"
+      src="/_next/static/runtime/main-e0fc5b9bc2bdb3c37c49.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-13943bb967ef83ef2daf.module.js"
+      src="/_next/static/runtime/main-901e52f5bd00f3082138.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
buildDuration 14.9s 14.9s ⚠️ +3ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +616 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.js gzip 5.11 kB 5.12 kB ⚠️ +9 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..fffc.js gzip 13.7 kB 13.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +9 B
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.module.js gzip 4.17 kB 4.17 kB
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.js gzip 1.34 kB 1.34 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.module.js gzip 769 B 769 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.42 kB 7.42 kB
Client Build Manifests
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Serverless bundles Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_error.js gzip 70.9 kB 70.9 kB -2 B
hooks.html gzip 1.05 kB 1.05 kB -1 B
index.js gzip 71.3 kB 71.3 kB -2 B
link.js gzip 80.6 kB 80.6 kB -2 B
routerDirect.js gzip 78.2 kB 78.2 kB -2 B
withRouter.js gzip 78.3 kB 78.3 kB -2 B
Overall change 380 kB 380 kB -11 B

Commit: 8501900

@ijjk
Copy link
Member Author

ijjk commented Jan 20, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
buildDuration 12.9s 12.8s -109ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +616 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.js gzip 5.11 kB 5.12 kB ⚠️ +8 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..fffc.js gzip 13.7 kB 13.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +8 B
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.module.js gzip 4.17 kB 4.17 kB
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.js gzip 1.34 kB 1.34 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.module.js gzip 769 B 769 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.42 kB 7.42 kB
Client Build Manifests
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
index.html gzip 1.02 kB 1.02 kB -1 B
link.html gzip 1.03 kB 1.03 kB -2 B
withRouter.html gzip 1.01 kB 1.01 kB
Overall change 3.06 kB 3.06 kB -3 B

Diffs

Diff for main-HASH.js
@@ -675,10 +675,26 @@
                           props: props,
                           err: initialErr,
                         }
+
+                        if (false) {
+                        }
+
                         render(renderCtx)
                         return _context.abrupt('return', emitter)
 
-                      case 31:
+                      case 32:
+                        if (true) {
+                          _context.next = 34
+                          break
+                        }
+
+                        return _context.abrupt('return', {
+                          emitter: emitter,
+                          render: render,
+                          renderCtx: renderCtx,
+                        })
+
+                      case 34:
                       case 'end':
                         return _context.stop()
                     }
Diff for main-HASH.module.js
@@ -481,8 +481,14 @@
               props,
               err: initialErr,
             }
-            render(renderCtx)
-            return emitter
+
+            if (true) {
+              render(renderCtx)
+              return emitter
+            }
+
+            if (false) {
+            }
           })
 
           return function(_x) {
Diff for index.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-45482708452cc3c95ba4.module.js"
+      href="/_next/static/runtime/main-c192b70e275f28312762.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -163,13 +163,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-bb671e4d1cf87573310a.js"
+      src="/_next/static/runtime/main-7312d99b5fd1b38e5560.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-45482708452cc3c95ba4.module.js"
+      src="/_next/static/runtime/main-c192b70e275f28312762.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-45482708452cc3c95ba4.module.js"
+      href="/_next/static/runtime/main-c192b70e275f28312762.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -168,13 +168,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-bb671e4d1cf87573310a.js"
+      src="/_next/static/runtime/main-7312d99b5fd1b38e5560.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-45482708452cc3c95ba4.module.js"
+      src="/_next/static/runtime/main-c192b70e275f28312762.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -45,7 +45,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-45482708452cc3c95ba4.module.js"
+      href="/_next/static/runtime/main-c192b70e275f28312762.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -163,13 +163,13 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-bb671e4d1cf87573310a.js"
+      src="/_next/static/runtime/main-7312d99b5fd1b38e5560.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-45482708452cc3c95ba4.module.js"
+      src="/_next/static/runtime/main-c192b70e275f28312762.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
buildDuration 13.7s 13.6s -110ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +616 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.js gzip 5.11 kB 5.12 kB ⚠️ +8 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..fffc.js gzip 13.7 kB 13.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +8 B
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
main-HASH.module.js gzip 4.17 kB 4.17 kB
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.js gzip 1.34 kB 1.34 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_app.module.js gzip 769 B 769 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.42 kB 7.42 kB
Client Build Manifests
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Serverless bundles Overall decrease ✓
zeit/next.js canary ijjk/next.js fix/initial-refs-css Change
_error.js gzip 70.9 kB 70.9 kB -3 B
hooks.html gzip 1.05 kB 1.05 kB -2 B
index.js gzip 71.3 kB 71.3 kB -2 B
link.js gzip 80.6 kB 80.5 kB -3 B
routerDirect.js gzip 78.2 kB 78.2 kB -3 B
withRouter.js gzip 78.3 kB 78.3 kB -3 B
Overall change 380 kB 380 kB -16 B

Commit: fe89202

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

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

LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: bug Confirmed bug that is on the backlog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element ref behavior differs in development and production for initial render with new CSS support
4 participants