-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sheerun
requested review from
ijjk,
lfades,
Timer and
timneutkens
as code owners
November 5, 2019 09:12
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Rendered Page Sizes
DiffsDiff 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 ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Serverless bundles Overall decrease ✓
Commit: 51bffda |
Could you fix the merge conflicts? Then I'll merge 👍 |
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Rendered Page Sizes
DiffsDiff 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 ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Serverless bundles Overall decrease ✓
Commit: 2c9a731 |
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Rendered Page Sizes
DiffsDiff 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 ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Serverless bundles Overall decrease ✓
Commit: 5ebcebb |
timneutkens
approved these changes
Nov 26, 2019
Can you run |
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Rendered Page Sizes
DiffsDiff 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 ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Serverless bundles Overall decrease ✓
Commit: 32d082e |
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Rendered Page Sizes
DiffsDiff 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 ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Serverless bundles Overall decrease ✓
Commit: 865e69e |
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Rendered Page Sizes
DiffsDiff 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 ✓
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages Overall decrease ✓
Client Pages Modern Overall decrease ✓
Client Build Manifests
Serverless bundles Overall decrease ✓
Commit: d20b1fc |
sheerun
force-pushed
the
fix-dedupe-head
branch
from
November 26, 2019 14:35
d20b1fc
to
b320632
Compare
@timneutkens I fixed the code |
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | sheerun/next.js fix-dedupe-head | Change | |
---|---|---|---|
buildDuration | 11.5s | 11.8s | |
nodeModulesSize | 48.6 MB | 48.6 MB |
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 | |
nodeModulesSize | 48.6 MB | 48.6 MB |
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
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | sheerun/next.js fix-dedupe-head | Change | |
---|---|---|---|
buildDuration | 14.5s | 14.7s | |
nodeModulesSize | 48.6 MB | 48.6 MB |
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 | |
nodeModulesSize | 48.6 MB | 48.6 MB |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: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.