Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deduplicating dynamic (array) meta tags #9315

Merged
merged 2 commits into from
Nov 26, 2019

Conversation

sheerun
Copy link
Contributor

@sheerun sheerun commented Nov 5, 2019

If react element has custom key, its object representation doesn't necessairly start with .$. For example elements generated with .map will have custom keys like .v:$foobar. Indeed any string after $ should be considered custom key. And that's what this PR fixes.

As a result meta tags that are generated with .map are deduplicated. One use case for this is generation of alternate links on _app.js versus individual pages:

{alternativeLanguages.map(language => (
  <link
    rel='alternate'
    key={language}
    hrefLang={language}
    href={generateAltLink(language)}
   />
))}

Without this fix alternate links are duplicated because links on _app.js have keys like .v:$pl and links on pages have keys like .u:$pl.

It also makes previous hacky fix in #8960 unnecessary, so I remove its code.

@ijjk
Copy link
Member

ijjk commented Nov 5, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.9s 15.1s ⚠️ +196ms
nodeModulesSize 48.5 MB 48.5 MB -403 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 16.6 kB 16.6 kB
main-HASH.js gzip 5.89 kB 5.89 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..7459734ec.js 20.1 kB 20.1 kB
16b1a7225520..34ec.js gzip 7.38 kB 7.38 kB
4952ddcd88e7..bfe360fe6.js 10.5 kB 10.5 kB
4952ddcd88e7..0fe6.js gzip 4.06 kB 4.06 kB
commons.HASH.js 11.3 kB 11.3 kB
commons.HASH.js gzip 4.23 kB 4.23 kB
de003c3a9d30..254ddadd9.js 28.7 kB 28.7 kB
de003c3a9d30..add9.js gzip 10.9 kB 10.9 kB
framework.1b..cdcfe1283.js 125 kB 125 kB
framework.1b..1283.js gzip 39.4 kB 39.4 kB
Overall change 214 kB 214 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.31 kB 5.31 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..0d.module.js 16.2 kB 16.2 kB
16b1a7225520..dule.js gzip 6.22 kB 6.22 kB
4952ddcd88e7..4a.module.js 12.8 kB 12.8 kB
4952ddcd88e7..dule.js gzip 4.75 kB 4.75 kB
de003c3a9d30..36.module.js 22.2 kB 22.2 kB
de003c3a9d30..dule.js gzip 8.71 kB 8.71 kB
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
Overall change 192 kB 192 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 1.63 kB 1.63 kB
_app.js gzip 788 B 788 B
_error.js 12.3 kB 12.3 kB -8 B
_error.js gzip 4.79 kB 4.79 kB ⚠️ +3 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 5.81 kB 5.81 kB
link.js gzip 2.56 kB 2.56 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 22.8 kB 22.8 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 759 B 759 B
_error.module.js 10.5 kB 10.5 kB -8 B
_error.module.js gzip 4.26 kB 4.27 kB ⚠️ +1 B
hooks.module.js 1.52 kB 1.52 kB
hooks.module.js gzip 792 B 792 B
index.module.js 292 B 292 B
index.module.js gzip 223 B 223 B
link.module.js 5.49 kB 5.49 kB
link.module.js gzip 2.47 kB 2.47 kB
routerDirect.module.js 399 B 399 B
routerDirect..dule.js gzip 285 B 285 B
withRouter.module.js 409 B 409 B
withRouter.m..dule.js gzip 282 B 282 B
Overall change 20.2 kB 20.2 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 201 B 201 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 209 B 209 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.03 kB 1.03 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.11 kB 1.11 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -299,16 +299,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false;
+    }
 
     switch (h.type) {
       case 'title':
Diff for _error.module.js
@@ -314,16 +314,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false;
+    }
 
     switch (h.type) {
       case 'title':

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 15.2s 15.1s -94ms
nodeModulesSize 48.5 MB 48.5 MB -403 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 16.6 kB 16.6 kB
main-HASH.js gzip 5.89 kB 5.89 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..7459734ec.js 20.1 kB 20.1 kB
16b1a7225520..34ec.js gzip 7.38 kB 7.38 kB
4952ddcd88e7..bfe360fe6.js 10.5 kB 10.5 kB
4952ddcd88e7..0fe6.js gzip 4.06 kB 4.06 kB
commons.HASH.js 11.3 kB 11.3 kB
commons.HASH.js gzip 4.23 kB 4.23 kB
de003c3a9d30..254ddadd9.js 28.7 kB 28.7 kB
de003c3a9d30..add9.js gzip 10.9 kB 10.9 kB
framework.1b..cdcfe1283.js 125 kB 125 kB
framework.1b..1283.js gzip 39.4 kB 39.4 kB
Overall change 214 kB 214 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.31 kB 5.31 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..0d.module.js 16.2 kB 16.2 kB
16b1a7225520..dule.js gzip 6.22 kB 6.22 kB
4952ddcd88e7..4a.module.js 12.8 kB 12.8 kB
4952ddcd88e7..dule.js gzip 4.75 kB 4.75 kB
de003c3a9d30..36.module.js 22.2 kB 22.2 kB
de003c3a9d30..dule.js gzip 8.71 kB 8.71 kB
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
Overall change 192 kB 192 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 1.63 kB 1.63 kB
_app.js gzip 788 B 788 B
_error.js 12.3 kB 12.3 kB -8 B
_error.js gzip 4.79 kB 4.79 kB ⚠️ +3 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 5.81 kB 5.81 kB
link.js gzip 2.56 kB 2.56 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 22.8 kB 22.8 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 759 B 759 B
_error.module.js 10.5 kB 10.5 kB -8 B
_error.module.js gzip 4.26 kB 4.27 kB ⚠️ +1 B
hooks.module.js 1.52 kB 1.52 kB
hooks.module.js gzip 792 B 792 B
index.module.js 292 B 292 B
index.module.js gzip 223 B 223 B
link.module.js 5.49 kB 5.49 kB
link.module.js gzip 2.47 kB 2.47 kB
routerDirect.module.js 399 B 399 B
routerDirect..dule.js gzip 285 B 285 B
withRouter.module.js 409 B 409 B
withRouter.m..dule.js gzip 282 B 282 B
Overall change 20.2 kB 20.2 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 201 B 201 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 209 B 209 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 248 kB 247 kB -188 B
_error.js gzip 65.6 kB 65.5 kB -93 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 248 kB 248 kB -188 B
index.js gzip 65.8 kB 65.7 kB -91 B
link.js 280 kB 280 kB -188 B
link.js gzip 74.7 kB 74.6 kB -98 B
routerDirect.js 273 kB 273 kB -188 B
routerDirect.js gzip 72.8 kB 72.7 kB -96 B
withRouter.js 273 kB 273 kB -188 B
withRouter.js gzip 72.9 kB 72.8 kB -99 B
Overall change 1.33 MB 1.33 MB -940 B

Commit: 51bffda

@timneutkens
Copy link
Member

Could you fix the merge conflicts? Then I'll merge 👍

@ijjk
Copy link
Member

ijjk commented Nov 23, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14s 14s -74ms
nodeModulesSize 48.3 MB 48.3 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 17.9 kB 17.9 kB
main-HASH.js gzip 6.33 kB 6.33 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..ebc17c08d.js 19.8 kB 19.8 kB
16b1a7225520..c08d.js gzip 7.35 kB 7.35 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..a824c82eb.js 28.3 kB 28.3 kB
de003c3a9d30..82eb.js gzip 10.7 kB 10.7 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 213 kB 213 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.3 kB 5.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..9a.module.js 21.3 kB 21.3 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.43 kB 4.43 kB
de003c3a9d30..36.module.js 22.2 kB 22.2 kB
de003c3a9d30..dule.js gzip 8.71 kB 8.71 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 196 kB 196 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 9.11 kB 9.11 kB
polyfills-HASH.js gzip 3.11 kB 3.11 kB
Overall change 9.11 kB 9.11 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 759 B 759 B
_error.module.js 10.5 kB 10.5 kB -8 B
_error.module.js gzip 4.26 kB 4.27 kB ⚠️ +1 B
hooks.module.js 677 B 677 B
hooks.module.js gzip 384 B 384 B
index.module.js 292 B 292 B
index.module.js gzip 223 B 223 B
link.module.js 5.49 kB 5.49 kB
link.module.js gzip 2.47 kB 2.47 kB
routerDirect.module.js 399 B 399 B
routerDirect..dule.js gzip 285 B 285 B
withRouter.module.js 409 B 409 B
withRouter.m..dule.js gzip 282 B 282 B
Overall change 19.3 kB 19.3 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 201 B 201 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 208 B 208 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.04 kB 1.04 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.12 kB 1.12 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -326,16 +326,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':
Diff for _error.module.js
@@ -314,16 +314,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.5s 14.3s -213ms
nodeModulesSize 48.3 MB 48.3 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 17.9 kB 17.9 kB
main-HASH.js gzip 6.33 kB 6.33 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..ebc17c08d.js 19.8 kB 19.8 kB
16b1a7225520..c08d.js gzip 7.35 kB 7.35 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..a824c82eb.js 28.3 kB 28.3 kB
de003c3a9d30..82eb.js gzip 10.7 kB 10.7 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 213 kB 213 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.3 kB 5.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..9a.module.js 21.3 kB 21.3 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.43 kB 4.43 kB
de003c3a9d30..36.module.js 22.2 kB 22.2 kB
de003c3a9d30..dule.js gzip 8.71 kB 8.71 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 196 kB 196 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 9.11 kB 9.11 kB
polyfills-HASH.js gzip 3.11 kB 3.11 kB
Overall change 9.11 kB 9.11 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 759 B 759 B
_error.module.js 10.5 kB 10.5 kB -8 B
_error.module.js gzip 4.26 kB 4.27 kB ⚠️ +1 B
hooks.module.js 677 B 677 B
hooks.module.js gzip 384 B 384 B
index.module.js 292 B 292 B
index.module.js gzip 223 B 223 B
link.module.js 5.49 kB 5.49 kB
link.module.js gzip 2.47 kB 2.47 kB
routerDirect.module.js 399 B 399 B
routerDirect..dule.js gzip 285 B 285 B
withRouter.module.js 409 B 409 B
withRouter.m..dule.js gzip 282 B 282 B
Overall change 19.3 kB 19.3 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 201 B 201 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 208 B 208 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 255 kB 255 kB -229 B
_error.js gzip 67.9 kB 67.8 kB -104 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -229 B
index.js gzip 68 kB 67.9 kB -108 B
link.js 288 kB 288 kB -229 B
link.js gzip 77.1 kB 77 kB -97 B
routerDirect.js 281 kB 281 kB -229 B
routerDirect.js gzip 75.1 kB 75 kB -97 B
withRouter.js 281 kB 281 kB -229 B
withRouter.js gzip 75.2 kB 75.1 kB -95 B
Overall change 1.37 MB 1.36 MB -1.15 kB

Commit: 2c9a731

@ijjk
Copy link
Member

ijjk commented Nov 25, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.4s 14.4s ⚠️ +14ms
nodeModulesSize 48.3 MB 48.3 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 17.9 kB 17.9 kB
main-HASH.js gzip 6.33 kB 6.33 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..ebc17c08d.js 19.8 kB 19.8 kB
16b1a7225520..c08d.js gzip 7.35 kB 7.35 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..a824c82eb.js 28.3 kB 28.3 kB
de003c3a9d30..82eb.js gzip 10.7 kB 10.7 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 213 kB 213 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.3 kB 5.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..9a.module.js 21.3 kB 21.3 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.43 kB 4.43 kB
de003c3a9d30..36.module.js 22.2 kB 22.2 kB
de003c3a9d30..dule.js gzip 8.71 kB 8.71 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 196 kB 196 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 9.11 kB 9.11 kB
polyfills-HASH.js gzip 3.11 kB 3.11 kB
Overall change 9.11 kB 9.11 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 759 B 759 B
_error.module.js 10.5 kB 10.5 kB -8 B
_error.module.js gzip 4.26 kB 4.27 kB ⚠️ +1 B
hooks.module.js 677 B 677 B
hooks.module.js gzip 384 B 384 B
index.module.js 292 B 292 B
index.module.js gzip 223 B 223 B
link.module.js 5.49 kB 5.49 kB
link.module.js gzip 2.47 kB 2.47 kB
routerDirect.module.js 399 B 399 B
routerDirect..dule.js gzip 285 B 285 B
withRouter.module.js 409 B 409 B
withRouter.m..dule.js gzip 282 B 282 B
Overall change 19.3 kB 19.3 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 201 B 201 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 208 B 208 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.04 kB 1.04 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.12 kB 1.12 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -326,16 +326,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':
Diff for _error.module.js
@@ -314,16 +314,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 15s 14.9s -130ms
nodeModulesSize 48.3 MB 48.3 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 17.9 kB 17.9 kB
main-HASH.js gzip 6.33 kB 6.33 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..ebc17c08d.js 19.8 kB 19.8 kB
16b1a7225520..c08d.js gzip 7.35 kB 7.35 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..a824c82eb.js 28.3 kB 28.3 kB
de003c3a9d30..82eb.js gzip 10.7 kB 10.7 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 213 kB 213 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.3 kB 5.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..9a.module.js 21.3 kB 21.3 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.43 kB 4.43 kB
de003c3a9d30..36.module.js 22.2 kB 22.2 kB
de003c3a9d30..dule.js gzip 8.71 kB 8.71 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 196 kB 196 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 9.11 kB 9.11 kB
polyfills-HASH.js gzip 3.11 kB 3.11 kB
Overall change 9.11 kB 9.11 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 759 B 759 B
_error.module.js 10.5 kB 10.5 kB -8 B
_error.module.js gzip 4.26 kB 4.27 kB ⚠️ +1 B
hooks.module.js 677 B 677 B
hooks.module.js gzip 384 B 384 B
index.module.js 292 B 292 B
index.module.js gzip 223 B 223 B
link.module.js 5.49 kB 5.49 kB
link.module.js gzip 2.47 kB 2.47 kB
routerDirect.module.js 399 B 399 B
routerDirect..dule.js gzip 285 B 285 B
withRouter.module.js 409 B 409 B
withRouter.m..dule.js gzip 282 B 282 B
Overall change 19.3 kB 19.3 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 201 B 201 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 208 B 208 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 255 kB 255 kB -229 B
_error.js gzip 67.9 kB 67.8 kB -104 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -229 B
index.js gzip 68 kB 67.9 kB -109 B
link.js 288 kB 288 kB -229 B
link.js gzip 77.1 kB 77 kB -96 B
routerDirect.js 281 kB 281 kB -229 B
routerDirect.js gzip 75.1 kB 75 kB -97 B
withRouter.js 281 kB 281 kB -229 B
withRouter.js gzip 75.2 kB 75.1 kB -95 B
Overall change 1.37 MB 1.36 MB -1.15 kB

Commit: 5ebcebb

@timneutkens
Copy link
Member

Can you run yarn lint-fix to fix the formatting.

@Timer Timer added this to the 9.1.5 milestone Nov 26, 2019
@ijjk
Copy link
Member

ijjk commented Nov 26, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 13.4s 13.4s ⚠️ +34ms
nodeModulesSize 48.6 MB 48.6 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.4 kB -8 B
_error.module.js gzip 4.25 kB 4.25 kB ⚠️ +2 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.03 kB 1.03 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.11 kB 1.11 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -326,16 +326,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':
Diff for _error.module.js
@@ -314,16 +314,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14s 14s ⚠️ +13ms
nodeModulesSize 48.6 MB 48.6 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.4 kB -8 B
_error.module.js gzip 4.25 kB 4.25 kB ⚠️ +2 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 256 kB 255 kB -229 B
_error.js gzip 67.9 kB 67.8 kB -108 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -229 B
index.js gzip 68.1 kB 68 kB -108 B
link.js 288 kB 288 kB -229 B
link.js gzip 77.2 kB 77.1 kB -98 B
routerDirect.js 281 kB 281 kB -229 B
routerDirect.js gzip 75.2 kB 75.1 kB -100 B
withRouter.js 281 kB 281 kB -229 B
withRouter.js gzip 75.3 kB 75.2 kB -99 B
Overall change 1.37 MB 1.37 MB -1.15 kB

Commit: 32d082e

@ijjk
Copy link
Member

ijjk commented Nov 26, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 12s 12s ⚠️ +1ms
nodeModulesSize 48.6 MB 48.6 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.4 kB -8 B
_error.module.js gzip 4.25 kB 4.25 kB ⚠️ +2 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.03 kB 1.03 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.11 kB 1.11 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -326,16 +326,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':
Diff for _error.module.js
@@ -314,16 +314,12 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
-
-
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
+    }
 
     switch (h.type) {
       case 'title':

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 12.5s 12.3s -208ms
nodeModulesSize 48.6 MB 48.6 MB -497 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.4 kB -8 B
_error.module.js gzip 4.25 kB 4.25 kB ⚠️ +2 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 256 kB 255 kB -229 B
_error.js gzip 67.9 kB 67.8 kB -108 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -229 B
index.js gzip 68.1 kB 68 kB -108 B
link.js 288 kB 288 kB -229 B
link.js gzip 77.2 kB 77.1 kB -98 B
routerDirect.js 281 kB 281 kB -229 B
routerDirect.js gzip 75.2 kB 75.1 kB -100 B
withRouter.js 281 kB 281 kB -229 B
withRouter.js gzip 75.3 kB 75.2 kB -99 B
Overall change 1.37 MB 1.37 MB -1.15 kB

Commit: 865e69e

@ijjk
Copy link
Member

ijjk commented Nov 26, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.3s 14.4s ⚠️ +164ms
nodeModulesSize 48.6 MB 48.6 MB -403 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.4 kB -8 B
_error.module.js gzip 4.25 kB 4.25 kB ⚠️ +2 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.03 kB 1.03 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.11 kB 1.11 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -326,17 +326,14 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
+    } // eslint-disable-next-line default-case
 
 
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
-
     switch (h.type) {
       case 'title':
       case 'base':
Diff for _error.module.js
@@ -314,17 +314,14 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+      if (keys.has(key)) return false;
+      keys.add(key);
       return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
+    } // eslint-disable-next-line default-case
 
 
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
-
     switch (h.type) {
       case 'title':
       case 'base':

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.8s 14.8s -48ms
nodeModulesSize 48.6 MB 48.6 MB -403 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -8 B
_error.js gzip 5.1 kB 5.11 kB ⚠️ +6 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 26 kB -8 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.4 kB -8 B
_error.module.js gzip 4.25 kB 4.25 kB ⚠️ +2 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -8 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 256 kB 256 kB -187 B
_error.js gzip 67.9 kB 67.8 kB -98 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -187 B
index.js gzip 68.1 kB 68 kB -98 B
link.js 288 kB 288 kB -187 B
link.js gzip 77.2 kB 77.1 kB -87 B
routerDirect.js 281 kB 281 kB -187 B
routerDirect.js gzip 75.2 kB 75.1 kB -89 B
withRouter.js 281 kB 281 kB -187 B
withRouter.js gzip 75.3 kB 75.2 kB -88 B
Overall change 1.37 MB 1.37 MB -935 B

Commit: d20b1fc

@timneutkens
Copy link
Member

Screen Shot 2019-11-26 at 14 02 20

Looks like one of the tests failed.

@sheerun
Copy link
Contributor Author

sheerun commented Nov 26, 2019

@timneutkens I fixed the code

@ijjk
Copy link
Member

ijjk commented Nov 26, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 11.5s 11.8s ⚠️ +292ms
nodeModulesSize 48.6 MB 48.6 MB ⚠️ +39 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -56 B
_error.js gzip 5.1 kB 5.1 kB -3 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 25.9 kB -56 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.3 kB -56 B
_error.module.js gzip 4.25 kB 4.24 kB -10 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -56 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.03 kB 1.03 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.11 kB 1.11 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -276,13 +276,11 @@ var amp_1 = __webpack_require__("/0+H");
 function defaultHead() {
   var inAmpMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
   var head = [react_1["default"].createElement("meta", {
-    key: "charSet",
     charSet: "utf-8"
   })];
 
   if (!inAmpMode) {
     head.push(react_1["default"].createElement("meta", {
-      key: "viewport",
       name: "viewport",
       content: "width=device-width,minimum-scale=1,initial-scale=1"
     }));
@@ -326,22 +324,28 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
-      return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
+    var unique = true;
 
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+
+      if (keys.has(key)) {
+        unique = false;
+      } else {
+        keys.add(key);
+      }
+    } // eslint-disable-next-line default-case
 
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
 
     switch (h.type) {
       case 'title':
       case 'base':
-        if (tags.has(h.type)) return false;
-        tags.add(h.type);
+        if (tags.has(h.type)) {
+          unique = false;
+        } else {
+          tags.add(h.type);
+        }
+
         break;
 
       case 'meta':
@@ -350,21 +354,28 @@ function unique() {
           if (!h.props.hasOwnProperty(metatype)) continue;
 
           if (metatype === 'charSet') {
-            if (metaTypes.has(metatype)) return false;
-            metaTypes.add(metatype);
+            if (metaTypes.has(metatype)) {
+              unique = false;
+            } else {
+              metaTypes.add(metatype);
+            }
           } else {
             var category = h.props[metatype];
             var categories = metaCategories[metatype] || new _Set();
-            if (categories.has(category)) return false;
-            categories.add(category);
-            metaCategories[metatype] = categories;
+
+            if (categories.has(category)) {
+              unique = false;
+            } else {
+              categories.add(category);
+              metaCategories[metatype] = categories;
+            }
           }
         }
 
         break;
     }
 
-    return true;
+    return unique;
   };
 }
 /**
Diff for _error.module.js
@@ -264,13 +264,11 @@ var amp_1 = __webpack_require__("/0+H");
 function defaultHead() {
   var inAmpMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
   var head = [react_1.default.createElement("meta", {
-    key: "charSet",
     charSet: "utf-8"
   })];
 
   if (!inAmpMode) {
     head.push(react_1.default.createElement("meta", {
-      key: "viewport",
       name: "viewport",
       content: "width=device-width,minimum-scale=1,initial-scale=1"
     }));
@@ -314,22 +312,28 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
-      return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
+    var unique = true;
 
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+
+      if (keys.has(key)) {
+        unique = false;
+      } else {
+        keys.add(key);
+      }
+    } // eslint-disable-next-line default-case
 
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
 
     switch (h.type) {
       case 'title':
       case 'base':
-        if (tags.has(h.type)) return false;
-        tags.add(h.type);
+        if (tags.has(h.type)) {
+          unique = false;
+        } else {
+          tags.add(h.type);
+        }
+
         break;
 
       case 'meta':
@@ -338,21 +342,28 @@ function unique() {
           if (!h.props.hasOwnProperty(metatype)) continue;
 
           if (metatype === 'charSet') {
-            if (metaTypes.has(metatype)) return false;
-            metaTypes.add(metatype);
+            if (metaTypes.has(metatype)) {
+              unique = false;
+            } else {
+              metaTypes.add(metatype);
+            }
           } else {
             var category = h.props[metatype];
             var categories = metaCategories[metatype] || new _Set();
-            if (categories.has(category)) return false;
-            categories.add(category);
-            metaCategories[metatype] = categories;
+
+            if (categories.has(category)) {
+              unique = false;
+            } else {
+              categories.add(category);
+              metaCategories[metatype] = categories;
+            }
           }
         }
 
         break;
     }
 
-    return true;
+    return unique;
   };
 }
 /**

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 12.1s 12.4s ⚠️ +224ms
nodeModulesSize 48.6 MB 48.6 MB ⚠️ +39 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -56 B
_error.js gzip 5.1 kB 5.1 kB -3 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 25.9 kB -56 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.3 kB -56 B
_error.module.js gzip 4.25 kB 4.24 kB -10 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -56 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 256 kB 256 kB -28 B
_error.js gzip 67.9 kB 67.9 kB -80 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -28 B
index.js gzip 68.1 kB 68 kB -79 B
link.js 288 kB 288 kB -28 B
link.js gzip 77.2 kB 77.1 kB -73 B
routerDirect.js 281 kB 281 kB -28 B
routerDirect.js gzip 75.2 kB 75.1 kB -75 B
withRouter.js 281 kB 281 kB -28 B
withRouter.js gzip 75.3 kB 75.2 kB -75 B
Overall change 1.37 MB 1.37 MB -140 B

Commit: b320632

@ijjk
Copy link
Member

ijjk commented Nov 26, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.5s 14.7s ⚠️ +183ms
nodeModulesSize 48.6 MB 48.6 MB ⚠️ +39 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -56 B
_error.js gzip 5.1 kB 5.1 kB -3 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 25.9 kB -56 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.3 kB -56 B
_error.module.js gzip 4.25 kB 4.24 kB -10 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -56 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
index.html 4.06 kB 4.06 kB
index.html gzip 1.03 kB 1.03 kB
link.html 4.58 kB 4.58 kB
link.html gzip 1.11 kB 1.11 kB
withRouter.html 4.59 kB 4.59 kB
withRouter.html gzip 1.1 kB 1.1 kB
Overall change 13.2 kB 13.2 kB

Diffs

Diff for _error.js
@@ -276,13 +276,11 @@ var amp_1 = __webpack_require__("/0+H");
 function defaultHead() {
   var inAmpMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
   var head = [react_1["default"].createElement("meta", {
-    key: "charSet",
     charSet: "utf-8"
   })];
 
   if (!inAmpMode) {
     head.push(react_1["default"].createElement("meta", {
-      key: "viewport",
       name: "viewport",
       content: "width=device-width,minimum-scale=1,initial-scale=1"
     }));
@@ -326,22 +324,28 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return function (h) {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
-      return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
+    var unique = true;
 
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+
+      if (keys.has(key)) {
+        unique = false;
+      } else {
+        keys.add(key);
+      }
+    } // eslint-disable-next-line default-case
 
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
 
     switch (h.type) {
       case 'title':
       case 'base':
-        if (tags.has(h.type)) return false;
-        tags.add(h.type);
+        if (tags.has(h.type)) {
+          unique = false;
+        } else {
+          tags.add(h.type);
+        }
+
         break;
 
       case 'meta':
@@ -350,21 +354,28 @@ function unique() {
           if (!h.props.hasOwnProperty(metatype)) continue;
 
           if (metatype === 'charSet') {
-            if (metaTypes.has(metatype)) return false;
-            metaTypes.add(metatype);
+            if (metaTypes.has(metatype)) {
+              unique = false;
+            } else {
+              metaTypes.add(metatype);
+            }
           } else {
             var category = h.props[metatype];
             var categories = metaCategories[metatype] || new _Set();
-            if (categories.has(category)) return false;
-            categories.add(category);
-            metaCategories[metatype] = categories;
+
+            if (categories.has(category)) {
+              unique = false;
+            } else {
+              categories.add(category);
+              metaCategories[metatype] = categories;
+            }
           }
         }
 
         break;
     }
 
-    return true;
+    return unique;
   };
 }
 /**
Diff for _error.module.js
@@ -264,13 +264,11 @@ var amp_1 = __webpack_require__("/0+H");
 function defaultHead() {
   var inAmpMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
   var head = [react_1.default.createElement("meta", {
-    key: "charSet",
     charSet: "utf-8"
   })];
 
   if (!inAmpMode) {
     head.push(react_1.default.createElement("meta", {
-      key: "viewport",
       name: "viewport",
       content: "width=device-width,minimum-scale=1,initial-scale=1"
     }));
@@ -314,22 +312,28 @@ function unique() {
   var metaTypes = new _Set();
   var metaCategories = {};
   return h => {
-    if (h.key && typeof h.key !== 'number' && h.key.indexOf('.$') === 0) {
-      if (keys.has(h.key)) return false;
-      keys.add(h.key);
-      return true;
-    } // If custom meta tag has been added the key will be prepended with `.$`, we can
-    // check for this and dedupe in favor of the custom one, so the default
-    // is not rendered as well
+    var unique = true;
 
+    if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
+      var key = h.key.slice(h.key.indexOf('$') + 1);
+
+      if (keys.has(key)) {
+        unique = false;
+      } else {
+        keys.add(key);
+      }
+    } // eslint-disable-next-line default-case
 
-    if (keys.has(".$".concat(h.key))) return false; // eslint-disable-next-line default-case
 
     switch (h.type) {
       case 'title':
       case 'base':
-        if (tags.has(h.type)) return false;
-        tags.add(h.type);
+        if (tags.has(h.type)) {
+          unique = false;
+        } else {
+          tags.add(h.type);
+        }
+
         break;
 
       case 'meta':
@@ -338,21 +342,28 @@ function unique() {
           if (!h.props.hasOwnProperty(metatype)) continue;
 
           if (metatype === 'charSet') {
-            if (metaTypes.has(metatype)) return false;
-            metaTypes.add(metatype);
+            if (metaTypes.has(metatype)) {
+              unique = false;
+            } else {
+              metaTypes.add(metatype);
+            }
           } else {
             var category = h.props[metatype];
             var categories = metaCategories[metatype] || new _Set();
-            if (categories.has(category)) return false;
-            categories.add(category);
-            metaCategories[metatype] = categories;
+
+            if (categories.has(category)) {
+              unique = false;
+            } else {
+              categories.add(category);
+              metaCategories[metatype] = categories;
+            }
           }
         }
 
         break;
     }
 
-    return true;
+    return unique;
   };
 }
 /**

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
buildDuration 14.9s 15s ⚠️ +96ms
nodeModulesSize 48.6 MB 48.6 MB ⚠️ +39 B
Client Bundles (main, webpack, commons)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.js 18.1 kB 18.1 kB
main-HASH.js gzip 6.39 kB 6.39 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..4086094cc.js 19.8 kB 19.8 kB
16b1a7225520..94cc.js gzip 7.37 kB 7.37 kB
4952ddcd88e7..49d7903c2.js 9.6 kB 9.6 kB
4952ddcd88e7..03c2.js gzip 3.76 kB 3.76 kB
commons.HASH.js 10.4 kB 10.4 kB
commons.HASH.js gzip 3.91 kB 3.91 kB
de003c3a9d30..64b97c6d1.js 21.1 kB 21.1 kB
de003c3a9d30..c6d1.js gzip 8.15 kB 8.15 kB
framework.HASH.js 125 kB 125 kB
framework.HASH.js gzip 39.4 kB 39.4 kB
Overall change 206 kB 206 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
main-HASH.module.js 14.1 kB 14.1 kB
main-HASH.module.js gzip 5.33 kB 5.33 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..95.module.js 21.1 kB 21.1 kB
16b1a7225520..dule.js gzip 8.14 kB 8.14 kB
4952ddcd88e7..cc.module.js 11.9 kB 11.9 kB
4952ddcd88e7..dule.js gzip 4.41 kB 4.41 kB
de003c3a9d30..f3.module.js 14.9 kB 14.9 kB
de003c3a9d30..dule.js gzip 6.11 kB 6.11 kB
framework.HASH.module.js 125 kB 125 kB
framework.HA..dule.js gzip 39.4 kB 39.4 kB
Overall change 189 kB 189 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
polyfills-HASH.js 15.3 kB 15.3 kB
polyfills-HASH.js gzip 4.75 kB 4.75 kB
Overall change 15.3 kB 15.3 kB
Client Pages Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.js 2.92 kB 2.92 kB
_app.js gzip 1.32 kB 1.32 kB
_error.js 13.2 kB 13.2 kB -56 B
_error.js gzip 5.1 kB 5.1 kB -3 B
hooks.js 1.92 kB 1.92 kB
hooks.js gzip 941 B 941 B
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 6.76 kB 6.76 kB
link.js gzip 2.88 kB 2.88 kB
routerDirect.js 413 B 413 B
routerDirect.js gzip 285 B 285 B
withRouter.js 423 B 423 B
withRouter.js gzip 284 B 284 B
Overall change 26 kB 25.9 kB -56 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_app.module.js 1.53 kB 1.53 kB
_app.module.js gzip 745 B 745 B
_error.module.js 10.4 kB 10.3 kB -56 B
_error.module.js gzip 4.25 kB 4.24 kB -10 B
hooks.module.js 651 B 651 B
hooks.module.js gzip 371 B 371 B
index.module.js 276 B 276 B
index.module.js gzip 212 B 212 B
link.module.js 5.44 kB 5.44 kB
link.module.js gzip 2.45 kB 2.45 kB
routerDirect.module.js 386 B 386 B
routerDirect..dule.js gzip 275 B 275 B
withRouter.module.js 396 B 396 B
withRouter.m..dule.js gzip 274 B 274 B
Overall change 19.1 kB 19 kB -56 B
Client Build Manifests
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 200 B 200 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 210 B 210 B
Overall change 495 B 495 B
Serverless bundles Overall decrease ✓
zeit/next.js canary sheerun/next.js fix-dedupe-head Change
_error.js 256 kB 256 kB -28 B
_error.js gzip 67.9 kB 67.9 kB -80 B
hooks.html 4.19 kB 4.19 kB
hooks.html gzip 1.07 kB 1.07 kB
index.js 256 kB 256 kB -28 B
index.js gzip 68.1 kB 68 kB -79 B
link.js 288 kB 288 kB -28 B
link.js gzip 77.2 kB 77.1 kB -73 B
routerDirect.js 281 kB 281 kB -28 B
routerDirect.js gzip 75.2 kB 75.1 kB -75 B
withRouter.js 281 kB 281 kB -28 B
withRouter.js gzip 75.3 kB 75.2 kB -75 B
Overall change 1.37 MB 1.37 MB -140 B

Commit: ee7e135

@Timer Timer merged commit 9c9f060 into vercel:canary Nov 26, 2019
@vercel vercel locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants