-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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(link): cancel idle callback on unmount #22072
Conversation
React complains if you attempt to make changes either outside of `act` or after the component has unmounted. In tests with this setup, the idle callback is scheduled and run later, but the component has already been unmounted. This ensures unmounted components don't run their idle callback. Fixes #20048.
Sweeeeeeeeeeeeeeet! |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 11.7s | 11.4s | -267ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.246 | 2.2 | -0.05 |
/ avg req/sec | 1113.15 | 1136.47 | +23.32 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.581 | 1.485 | -0.1 |
/error-in-render avg req/sec | 1581.4 | 1683.36 | +101.96 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | 1.67 kB | |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 614 B | 612 B | -2 B |
link.html gzip | 620 B | 619 B | -1 B |
withRouter.html gzip | 607 B | 607 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-e732be88e7750c8b99f5.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-df11b317aadf9fd402f9.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-1758aa74927b71637af8.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-b3467c130a6d01a76dae.js"
],
Diff for link-df11b31..f9fd402f9.js
@@ -321,16 +321,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
var _slicedToArray = __webpack_require__("J4zp");
- var _interopRequireDefault = __webpack_require__("TqRt");
-
exports.__esModule = true;
exports.useIntersection = useIntersection;
var _react = __webpack_require__("q1tI");
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- );
+ var _requestIdleCallback = __webpack_require__("0G5g");
var hasIntersectionObserver = typeof IntersectionObserver !== "undefined";
@@ -371,10 +367,17 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
(0, _react.useEffect)(
function() {
if (!hasIntersectionObserver) {
- if (!visible)
- (0, _requestIdleCallback["default"])(function() {
+ if (!visible) {
+ var idleCallback = (0,
+ _requestIdleCallback.requestIdleCallback)(function() {
return setVisible(true);
});
+ return function() {
+ return (0, _requestIdleCallback.cancelIdleCallback)(
+ idleCallback
+ );
+ };
+ }
}
},
[visible]
Diff for 677f882d2ed8..b246b9f81.js
@@ -59,7 +59,7 @@
"use strict";
exports.__esModule = true;
- exports["default"] = void 0;
+ exports.cancelIdleCallback = exports.requestIdleCallback = void 0;
var requestIdleCallback =
(typeof self !== "undefined" && self.requestIdleCallback) ||
@@ -75,8 +75,15 @@
}, 1);
};
- var _default = requestIdleCallback;
- exports["default"] = _default;
+ exports.requestIdleCallback = requestIdleCallback;
+
+ var cancelIdleCallback =
+ (typeof self !== "undefined" && self.cancelIdleCallback) ||
+ function(id) {
+ return clearTimeout(id);
+ };
+
+ exports.cancelIdleCallback = cancelIdleCallback;
/***/
},
@@ -476,9 +483,7 @@
__webpack_require__("Lab5")
);
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- ); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
+ var _requestIdleCallback = __webpack_require__("0G5g"); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
// considers as "Good" time-to-interactive. We must assume something went
// wrong beyond this point, and then fall-back to a full page transition to
// show the user something of value.
@@ -588,7 +593,7 @@
function idleTimeout(ms, err) {
return new Promise(function(_resolve, reject) {
- return (0, _requestIdleCallback["default"])(function() {
+ return (0, _requestIdleCallback.requestIdleCallback)(function() {
return setTimeout(function() {
return reject(err);
}, ms);
@@ -845,7 +850,7 @@
);
})
.then(function() {
- (0, _requestIdleCallback["default"])(function() {
+ (0, _requestIdleCallback.requestIdleCallback)(function() {
return _this2.loadRoute(route);
});
})
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ href="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
as="script"
/>
</head>
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
@@ -78,7 +78,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ src="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 13.9s | 13.6s | -206ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..5cb0.js gzip | N/A | 13.1 kB | N/A |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | N/A | N/A |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
link-177412b..043e.js gzip | N/A | 1.67 kB | N/A |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_error.js | 1.01 MB | 1.01 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
amp.amp.html | 10.4 kB | 10.4 kB | ✓ |
amp.html | 1.86 kB | 1.86 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1.01 MB | 1.01 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | |
routerDirect.js | 1.06 MB | 1.06 MB | |
withRouter.js | 1.06 MB | 1.06 MB | |
Overall change | 5.2 MB | 5.2 MB |
Webpack 5 Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 13.8s | 13.6s | -153ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.268 | 2.216 | -0.05 |
/ avg req/sec | 1102.25 | 1128.14 | +25.89 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.583 | 1.538 | -0.04 |
/error-in-render avg req/sec | 1579.12 | 1626.02 | +46.9 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
597-913d7a8f..1f0e.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 6.58 kB | 6.58 kB | ✓ |
webpack-HASH.js gzip | 954 B | 954 B | ✓ |
Overall change | 59.9 kB | 59.9 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-6e0a903..b885.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-9e190..f9d6.js gzip | 3.38 kB | 3.38 kB | ✓ |
amp-7fd79cc4..99ee.js gzip | 538 B | 538 B | ✓ |
hooks-f7e199..11b9.js gzip | 904 B | 904 B | ✓ |
index-3dc22c..ffbb.js gzip | 232 B | 232 B | ✓ |
link-b960f55..1c2e.js gzip | 1.63 kB | 1.66 kB | |
routerDirect..323a.js gzip | 308 B | 308 B | ✓ |
withRouter-a..2ef8.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.56 kB | 8.59 kB |
Client Build Manifests
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
Overall change | 322 B | 322 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 586 B | 584 B | -2 B |
link.html gzip | 593 B | 593 B | ✓ |
withRouter.html gzip | 580 B | 579 B | -1 B |
Overall change | 1.76 kB | 1.76 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-5023ef2ff38488073670.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-020eb2794ab7d2ded87f.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-177412b8418bdebf043e.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-73e91dc4f2667a6a1a66.js"
],
Diff for link-020eb27..7d2ded87f.js
@@ -42,15 +42,15 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
c = t("elyg"),
u = t("nOHt"),
i = t("vNVm"),
- f = {};
- function l(e, n, t, r) {
+ l = {};
+ function f(e, n, t, r) {
if (e && (0, c.isLocalURL)(n)) {
e.prefetch(n, t, r).catch(function(e) {
0;
});
var o =
r && "undefined" !== typeof r.locale ? r.locale : e && e.locale;
- f[n + "%" + t + (o ? "%" + o : "")] = !0;
+ l[n + "%" + t + (o ? "%" + o : "")] = !0;
}
}
var s = function(e) {
@@ -75,11 +75,11 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
v = e.children,
h = e.replace,
y = e.shallow,
- g = e.scroll,
- _ = e.locale;
+ b = e.scroll,
+ g = e.locale;
"string" === typeof v && (v = a.default.createElement("a", null, v));
- var b = a.Children.only(v),
- m = b && "object" === typeof b && b.ref,
+ var _ = a.Children.only(v),
+ m = _ && "object" === typeof _ && _.ref,
w = (0, i.useIntersection)({ rootMargin: "200px" }),
E = r(w, 2),
L = E[0],
@@ -97,18 +97,18 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
(0, a.useEffect)(
function() {
var e = M && n && (0, c.isLocalURL)(p),
- r = "undefined" !== typeof _ ? _ : t && t.locale,
- o = f[p + "%" + d + (r ? "%" + r : "")];
- e && !o && l(t, p, d, { locale: r });
+ r = "undefined" !== typeof g ? g : t && t.locale,
+ o = l[p + "%" + d + (r ? "%" + r : "")];
+ e && !o && f(t, p, d, { locale: r });
},
- [d, p, M, _, n, t]
+ [d, p, M, g, n, t]
);
var I = {
ref: k,
onClick: function(e) {
- b.props &&
- "function" === typeof b.props.onClick &&
- b.props.onClick(e),
+ _.props &&
+ "function" === typeof _.props.onClick &&
+ _.props.onClick(e),
e.defaultPrevented ||
(function(e, n, t, r, o, a, u, i) {
("A" !== e.currentTarget.nodeName ||
@@ -133,19 +133,19 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
}).then(function(e) {
e && u && document.body.focus();
}));
- })(e, t, p, d, h, y, g, _);
+ })(e, t, p, d, h, y, b, g);
},
onMouseEnter: function(e) {
(0, c.isLocalURL)(p) &&
- (b.props &&
- "function" === typeof b.props.onMouseEnter &&
- b.props.onMouseEnter(e),
- l(t, p, d, { priority: !0 }));
+ (_.props &&
+ "function" === typeof _.props.onMouseEnter &&
+ _.props.onMouseEnter(e),
+ f(t, p, d, { priority: !0 }));
}
};
- if (e.passHref || ("a" === b.type && !("href" in b.props))) {
- var N = "undefined" !== typeof _ ? _ : t && t.locale,
- O =
+ if (e.passHref || ("a" === _.type && !("href" in _.props))) {
+ var N = "undefined" !== typeof g ? g : t && t.locale,
+ C =
t &&
t.isLocaleDomain &&
(0, c.getDomainLocale)(
@@ -155,37 +155,36 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
t && t.domainLocales
);
I.href =
- O ||
+ C ||
(0, c.addBasePath)((0, c.addLocale)(d, N, t && t.defaultLocale));
}
- return a.default.cloneElement(b, I);
+ return a.default.cloneElement(_, I);
};
n.default = s;
},
vNVm: function(e, n, t) {
"use strict";
- var r = t("J4zp"),
- o = t("TqRt");
+ var r = t("J4zp");
(n.__esModule = !0),
(n.useIntersection = function(e) {
var n = e.rootMargin,
- t = e.disabled || !u,
- o = (0, a.useRef)(),
- f = (0, a.useState)(!1),
- l = r(f, 2),
- s = l[0],
- p = l[1],
- d = (0, a.useCallback)(
+ t = e.disabled || !c,
+ i = (0, o.useRef)(),
+ l = (0, o.useState)(!1),
+ f = r(l, 2),
+ s = f[0],
+ p = f[1],
+ d = (0, o.useCallback)(
function(e) {
- o.current && (o.current(), (o.current = void 0)),
+ i.current && (i.current(), (i.current = void 0)),
t ||
s ||
(e &&
e.tagName &&
- (o.current = (function(e, n, t) {
+ (i.current = (function(e, n, t) {
var r = (function(e) {
var n = e.rootMargin || "",
- t = i.get(n);
+ t = u.get(n);
if (t) return t;
var r = new Map(),
o = new IntersectionObserver(function(e) {
@@ -198,7 +197,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
});
}, e);
return (
- i.set(
+ u.set(
n,
(t = { id: n, observer: o, elements: r })
),
@@ -214,7 +213,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
function() {
c.delete(e),
a.unobserve(e),
- 0 === c.size && (a.disconnect(), i.delete(o));
+ 0 === c.size && (a.disconnect(), u.delete(o));
}
);
})(
@@ -228,23 +227,26 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
[t, n, s]
);
return (
- (0, a.useEffect)(
+ (0, o.useEffect)(
function() {
- u ||
- s ||
- (0, c.default)(function() {
+ if (!c && !s) {
+ var e = (0, a.requestIdleCallback)(function() {
return p(!0);
});
+ return function() {
+ return (0, a.cancelIdleCallback)(e);
+ };
+ }
},
[s]
),
[d, s]
);
});
- var a = t("q1tI"),
- c = o(t("0G5g")),
- u = "undefined" !== typeof IntersectionObserver;
- var i = new Map();
+ var o = t("q1tI"),
+ a = t("0G5g"),
+ c = "undefined" !== typeof IntersectionObserver;
+ var u = new Map();
}
},
[["V8Sf", 0, 1, 2]]
Diff for 677f882d2ed8..df2824c01.js
@@ -30,7 +30,8 @@
},
"0G5g": function(t, e, r) {
"use strict";
- (e.__esModule = !0), (e.default = void 0);
+ (e.__esModule = !0),
+ (e.cancelIdleCallback = e.requestIdleCallback = void 0);
var n =
("undefined" !== typeof self && self.requestIdleCallback) ||
function(t) {
@@ -44,7 +45,13 @@
});
}, 1);
};
- e.default = n;
+ e.requestIdleCallback = n;
+ var o =
+ ("undefined" !== typeof self && self.cancelIdleCallback) ||
+ function(t) {
+ return clearTimeout(t);
+ };
+ e.cancelIdleCallback = o;
},
"284h": function(t, e, r) {
var n = r("cDf5");
@@ -265,7 +272,7 @@
(e.getClientBuildManifest = p),
(e.default = void 0);
i(r("Lab5"));
- var u = i(r("0G5g"));
+ var u = r("0G5g");
function c(t, e, r) {
var n,
o = e.get(t);
@@ -299,7 +306,7 @@
}
function h(t, e) {
return new Promise(function(r, n) {
- return (0, u.default)(function() {
+ return (0, u.requestIdleCallback)(function() {
return setTimeout(function() {
return n(e);
}, t);
@@ -520,7 +527,7 @@
);
})
.then(function() {
- (0, u.default)(function() {
+ (0, u.requestIdleCallback)(function() {
return n.loadRoute(e);
});
})
@@ -714,9 +721,9 @@
}),
(e.addLocale = b),
(e.delLocale = _),
- (e.hasBasePath = P),
- (e.addBasePath = S),
- (e.delBasePath = k),
+ (e.hasBasePath = k),
+ (e.addBasePath = P),
+ (e.delBasePath = S),
(e.isLocalURL = E),
(e.interpolateAs = R),
(e.resolveHref = O),
@@ -748,10 +755,10 @@
r = t.indexOf("#");
return (e > -1 || r > -1) && (t = t.substring(0, e > -1 ? e : r)), t;
}
- function P(t) {
+ function k(t) {
return "" === (t = x(t)) || t.startsWith("/");
}
- function S(t) {
+ function P(t) {
return (function(t, e) {
return e && t.startsWith("/")
? "/" === t
@@ -760,7 +767,7 @@
: t;
})(t, "");
}
- function k(t) {
+ function S(t) {
return (
(t = t.slice("".length)).startsWith("/") || (t = "/".concat(t)), t
);
@@ -770,7 +777,7 @@
try {
var e = (0, h.getLocationOrigin)(),
r = new URL(t, e);
- return r.origin === e && P(r.pathname);
+ return r.origin === e && k(r.pathname);
} catch (n) {
return !1;
}
@@ -849,7 +856,7 @@
var e = (0, h.getLocationOrigin)();
return t.startsWith(e) ? t.substring(e.length) : t;
}
- function j(t, e, r) {
+ function I(t, e, r) {
var n = O(t.pathname, e, !0),
o = u(n, 2),
a = o[0],
@@ -858,18 +865,18 @@
s = a.startsWith(c),
l = i && i.startsWith(c);
(a = C(a)), (i = i ? C(i) : i);
- var f = s ? a : S(a),
+ var f = s ? a : P(a),
p = r ? C(O(t.pathname, r)) : i || a;
- return { url: f, as: l ? p : S(p) };
+ return { url: f, as: l ? p : P(p) };
}
- var T = Symbol("SSG_DATA_NOT_FOUND");
- function I(t, e) {
+ var j = Symbol("SSG_DATA_NOT_FOUND");
+ function T(t, e) {
return fetch(t, { credentials: "same-origin" }).then(function(r) {
if (!r.ok) {
- if (e > 1 && r.status >= 500) return I(t, e - 1);
+ if (e > 1 && r.status >= 500) return T(t, e - 1);
if (404 === r.status)
return r.json().then(function(t) {
- if (t.notFound) return { notFound: T };
+ if (t.notFound) return { notFound: j };
throw new Error("Failed to load static props");
});
throw new Error("Failed to load static props");
@@ -878,7 +885,7 @@
});
}
function A(t, e) {
- return I(t, e ? 3 : 1).catch(function(t) {
+ return T(t, e ? 3 : 1).catch(function(t) {
throw (e || (0, s.markAssetError)(t), t);
});
}
@@ -948,7 +955,7 @@
s = i.query;
i.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(c), query: s }),
+ (0, h.formatWithValidation)({ pathname: P(c), query: s }),
(0, h.getURL)()
);
}
@@ -986,7 +993,7 @@
"//" !== n.substr(0, 2) &&
this.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(e), query: r }),
+ (0, h.formatWithValidation)({ pathname: P(e), query: r }),
(0, h.getURL)(),
{ locale: w }
),
@@ -1013,7 +1020,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {};
- var n = j(this, t, e);
+ var n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("pushState", t, e, r)
);
@@ -1026,7 +1033,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {},
- n = j(this, t, e);
+ n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("replaceState", t, e, r)
);
@@ -1045,15 +1052,15 @@
x,
O,
C,
- I,
+ T,
A,
D,
M,
N,
U,
W,
- F,
q,
+ F,
G,
B,
H,
@@ -1100,14 +1107,14 @@
this._inFlightRoute,
g
),
- (a = S(
+ (a = P(
b(
- P(a) ? k(a) : a,
+ k(a) ? S(a) : a,
i.locale,
this.defaultLocale
)
)),
- (w = _(P(a) ? k(a) : a, this.locale)),
+ (w = _(k(a) ? S(a) : a, this.locale)),
(this._inFlightRoute = a),
i._h || !this.onlyAHashChange(w))
) {
@@ -1127,7 +1134,7 @@
return (
(x = (0, d.parseRelativeUrl)(o)),
(C = (O = x).pathname),
- (I = O.query),
+ (T = O.query),
(e.prev = 36),
(e.next = 39),
this.pageLoader.getPageList()
@@ -1154,7 +1161,7 @@
((C = x.pathname),
(o = (0, h.formatWithValidation)(x))),
(C = C
- ? (0, c.removePathTrailingSlash)(k(C))
+ ? (0, c.removePathTrailingSlash)(S(C))
: C),
this.urlIsNew(w) || f || (r = "replaceState"),
(M = (0, c.removePathTrailingSlash)(C)),
@@ -1173,7 +1180,7 @@
);
case 62:
if (
- ((N = _(k(N), this.locale)),
+ ((N = _(S(N), this.locale)),
!(0, p.isDynamicRoute)(M))
) {
e.next = 78;
@@ -1182,20 +1189,20 @@
if (
((U = (0, d.parseRelativeUrl)(N)),
(W = U.pathname),
- (F = (0, m.getRouteRegex)(M)),
- (q = (0, y.getRouteMatcher)(F)(W)),
- (B = (G = M === W) ? R(M, W, I) : {}),
- q && (!G || B.result))
+ (q = (0, m.getRouteRegex)(M)),
+ (F = (0, y.getRouteMatcher)(q)(W)),
+ (B = (G = M === W) ? R(M, W, T) : {}),
+ F && (!G || B.result))
) {
e.next = 77;
break;
}
if (
!(
- (H = Object.keys(F.groups).filter(function(
+ (H = Object.keys(q.groups).filter(function(
t
) {
- return !I[t];
+ return !T[t];
})).length > 0
)
) {
@@ -1233,16 +1240,16 @@
? (a = (0, h.formatWithValidation)(
Object.assign({}, U, {
pathname: B.result,
- query: L(I, B.params)
+ query: L(T, B.params)
})
))
- : Object.assign(I, q);
+ : Object.assign(T, F);
case 78:
return (
t.events.emit("routeChangeStart", a, g),
(e.prev = 79),
(e.next = 82),
- this.getRouteInfo(M, C, I, a, N, g)
+ this.getRouteInfo(M, C, T, a, N, g)
);
case 82:
if (
@@ -1275,7 +1282,7 @@
break;
}
return (
- (K = j(this, Q, Q)),
+ (K = I(this, Q, Q)),
(tt = K.url),
(et = K.as),
e.abrupt("return", this.change(r, tt, et, i))
@@ -1286,7 +1293,7 @@
e.abrupt("return", new Promise(function() {}))
);
case 95:
- if (J.notFound !== T) {
+ if (J.notFound !== j) {
e.next = 108;
break;
}
@@ -1305,7 +1312,7 @@
case 105:
return (
(e.next = 107),
- this.getRouteInfo(rt, rt, I, a, N, {
+ this.getRouteInfo(rt, rt, T, a, N, {
shallow: !1
})
);
@@ -1320,7 +1327,7 @@
this.set(
M,
C,
- I,
+ T,
w,
V,
u || (nt || !i.scroll ? null : { x: 0, y: 0 })
@@ -1680,7 +1687,7 @@
arguments[2],
n = t.pathname,
o = (0, c.removePathTrailingSlash)(
- (0, l.denormalizePagePath)(r ? k(n) : n)
+ (0, l.denormalizePagePath)(r ? S(n) : n)
);
return (
"/404" === o ||
@@ -1691,7 +1698,7 @@
(0, p.isDynamicRoute)(e) &&
(0, m.getRouteRegex)(e).re.test(o)
)
- return (t.pathname = r ? S(e) : e), !0;
+ return (t.pathname = r ? P(e) : e), !0;
}),
(t.pathname = (0, c.removePathTrailingSlash)(t.pathname))),
t
@@ -2112,7 +2119,7 @@
}
try {
c({}, "");
- } catch (j) {
+ } catch (I) {
c = function(t, e, r) {
return (t[e] = r);
};
@@ -2133,7 +2140,7 @@
for (r.method = o, r.arg = a; ; ) {
var i = r.delegate;
if (i) {
- var u = k(i, r);
+ var u = S(i, r);
if (u) {
if (u === v) continue;
return u;
@@ -2161,8 +2168,8 @@
function l(t, e, r) {
try {
return { type: "normal", arg: t.call(e, r) };
- } catch (j) {
- return { type: "throw", arg: j };
+ } catch (I) {
+ return { type: "throw", arg: I };
}
}
t.wrap = s;
@@ -2182,14 +2189,14 @@
_ = b && b(b(O([])));
_ && _ !== r && n.call(_, a) && (w = _);
var x = (g.prototype = y.prototype = Object.create(w));
- function P(t) {
+ function k(t) {
["next", "throw", "return"].forEach(function(e) {
c(t, e, function(t) {
return this._invoke(e, t);
});
});
}
- function S(t, e) {
+ function P(t, e) {
function r(o, a, i, u) {
var c = l(t[o], t, a);
if ("throw" !== c.type) {
@@ -2225,7 +2232,7 @@
return (o = o ? o.then(a, a) : a());
};
}
- function k(t, r) {
+ function S(t, r) {
var n = t.iterator[r.method];
if (n === e) {
if (((r.delegate = null), "throw" === r.method)) {
@@ -2233,7 +2240,7 @@
t.iterator.return &&
((r.method = "return"),
(r.arg = e),
- k(t, r),
+ S(t, r),
"throw" === r.method)
)
return v;
@@ -2321,21 +2328,21 @@
(t.awrap = function(t) {
return { __await: t };
}),
- P(S.prototype),
- (S.prototype[i] = function() {
+ k(P.prototype),
+ (P.prototype[i] = function() {
return this;
}),
- (t.AsyncIterator = S),
+ (t.AsyncIterator = P),
(t.async = function(e, r, n, o, a) {
void 0 === a && (a = Promise);
- var i = new S(s(e, r, n, o), a);
+ var i = new P(s(e, r, n, o), a);
return t.isGeneratorFunction(r)
? i
: i.next().then(function(t) {
return t.done ? t.value : i.next();
});
}),
- P(x),
+ k(x),
c(x, u, "Generator"),
(x[a] = function() {
return this;
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "kWihp40ZiFMabSUyyth2c",
+ "buildId": "9IlhvWDbmCxLdDTGWTvli",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/kWihp40ZiFMabSUyyth2c/_buildManifest.js"
+ src="/_next/static/9IlhvWDbmCxLdDTGWTvli/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/kWihp40ZiFMabSUyyth2c/_ssgManifest.js"
+ src="/_next/static/9IlhvWDbmCxLdDTGWTvli/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ href="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
as="script"
/>
</head>
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "kWihp40ZiFMabSUyyth2c",
+ "buildId": "9IlhvWDbmCxLdDTGWTvli",
"isFallback": false,
"gip": true
}
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -78,15 +78,15 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ src="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
async=""
></script>
<script
- src="/_next/static/kWihp40ZiFMabSUyyth2c/_buildManifest.js"
+ src="/_next/static/9IlhvWDbmCxLdDTGWTvli/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/kWihp40ZiFMabSUyyth2c/_ssgManifest.js"
+ src="/_next/static/9IlhvWDbmCxLdDTGWTvli/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "kWihp40ZiFMabSUyyth2c",
+ "buildId": "9IlhvWDbmCxLdDTGWTvli",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/kWihp40ZiFMabSUyyth2c/_buildManifest.js"
+ src="/_next/static/9IlhvWDbmCxLdDTGWTvli/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/kWihp40ZiFMabSUyyth2c/_ssgManifest.js"
+ src="/_next/static/9IlhvWDbmCxLdDTGWTvli/_ssgManifest.js"
async=""
></script>
</body>
Failing test suitesCommit: 3cc8c9f test/integration/build-output/test/index.test.js
Expand output● Build Output › Basic Application Output › should not deviate from snapshot
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that you need my approval, but this looks great! Can't wait to get this into our project.
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 11.5s | 11.4s | -150ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.143 | 2.096 | -0.05 |
/ avg req/sec | 1166.45 | 1192.61 | +26.16 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.402 | 1.294 | -0.11 |
/error-in-render avg req/sec | 1783.08 | 1932.43 | +149.35 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | 1.67 kB | |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 614 B | 612 B | -2 B |
link.html gzip | 620 B | 619 B | -1 B |
withRouter.html gzip | 607 B | 607 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-e732be88e7750c8b99f5.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-df11b317aadf9fd402f9.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-1758aa74927b71637af8.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-b3467c130a6d01a76dae.js"
],
Diff for link-df11b31..f9fd402f9.js
@@ -321,16 +321,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
var _slicedToArray = __webpack_require__("J4zp");
- var _interopRequireDefault = __webpack_require__("TqRt");
-
exports.__esModule = true;
exports.useIntersection = useIntersection;
var _react = __webpack_require__("q1tI");
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- );
+ var _requestIdleCallback = __webpack_require__("0G5g");
var hasIntersectionObserver = typeof IntersectionObserver !== "undefined";
@@ -371,10 +367,17 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
(0, _react.useEffect)(
function() {
if (!hasIntersectionObserver) {
- if (!visible)
- (0, _requestIdleCallback["default"])(function() {
+ if (!visible) {
+ var idleCallback = (0,
+ _requestIdleCallback.requestIdleCallback)(function() {
return setVisible(true);
});
+ return function() {
+ return (0, _requestIdleCallback.cancelIdleCallback)(
+ idleCallback
+ );
+ };
+ }
}
},
[visible]
Diff for 677f882d2ed8..b246b9f81.js
@@ -59,7 +59,7 @@
"use strict";
exports.__esModule = true;
- exports["default"] = void 0;
+ exports.cancelIdleCallback = exports.requestIdleCallback = void 0;
var requestIdleCallback =
(typeof self !== "undefined" && self.requestIdleCallback) ||
@@ -75,8 +75,15 @@
}, 1);
};
- var _default = requestIdleCallback;
- exports["default"] = _default;
+ exports.requestIdleCallback = requestIdleCallback;
+
+ var cancelIdleCallback =
+ (typeof self !== "undefined" && self.cancelIdleCallback) ||
+ function(id) {
+ return clearTimeout(id);
+ };
+
+ exports.cancelIdleCallback = cancelIdleCallback;
/***/
},
@@ -476,9 +483,7 @@
__webpack_require__("Lab5")
);
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- ); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
+ var _requestIdleCallback = __webpack_require__("0G5g"); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
// considers as "Good" time-to-interactive. We must assume something went
// wrong beyond this point, and then fall-back to a full page transition to
// show the user something of value.
@@ -588,7 +593,7 @@
function idleTimeout(ms, err) {
return new Promise(function(_resolve, reject) {
- return (0, _requestIdleCallback["default"])(function() {
+ return (0, _requestIdleCallback.requestIdleCallback)(function() {
return setTimeout(function() {
return reject(err);
}, ms);
@@ -845,7 +850,7 @@
);
})
.then(function() {
- (0, _requestIdleCallback["default"])(function() {
+ (0, _requestIdleCallback.requestIdleCallback)(function() {
return _this2.loadRoute(route);
});
})
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ href="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
as="script"
/>
</head>
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
@@ -78,7 +78,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ src="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 13.5s | 13.1s | -400ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..5cb0.js gzip | N/A | 13.1 kB | N/A |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | N/A | N/A |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
link-177412b..043e.js gzip | N/A | 1.67 kB | N/A |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_error.js | 1.01 MB | 1.01 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
amp.amp.html | 10.4 kB | 10.4 kB | ✓ |
amp.html | 1.86 kB | 1.86 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1.01 MB | 1.01 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | |
routerDirect.js | 1.06 MB | 1.06 MB | |
withRouter.js | 1.06 MB | 1.06 MB | |
Overall change | 5.2 MB | 5.2 MB |
Webpack 5 Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 13.4s | 13.5s | |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.084 | 2.05 | -0.03 |
/ avg req/sec | 1199.65 | 1219.63 | +19.98 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.314 | 1.309 | -0.01 |
/error-in-render avg req/sec | 1902.19 | 1910.39 | +8.2 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
597-913d7a8f..1f0e.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 6.58 kB | 6.58 kB | ✓ |
webpack-HASH.js gzip | 954 B | 954 B | ✓ |
Overall change | 59.9 kB | 59.9 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-6e0a903..b885.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-9e190..f9d6.js gzip | 3.38 kB | 3.38 kB | ✓ |
amp-7fd79cc4..99ee.js gzip | 538 B | 538 B | ✓ |
hooks-f7e199..11b9.js gzip | 904 B | 904 B | ✓ |
index-3dc22c..ffbb.js gzip | 232 B | 232 B | ✓ |
link-b960f55..1c2e.js gzip | 1.63 kB | 1.66 kB | |
routerDirect..323a.js gzip | 308 B | 308 B | ✓ |
withRouter-a..2ef8.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.56 kB | 8.59 kB |
Client Build Manifests
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
Overall change | 322 B | 322 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 586 B | 584 B | -2 B |
link.html gzip | 593 B | 593 B | ✓ |
withRouter.html gzip | 580 B | 579 B | -1 B |
Overall change | 1.76 kB | 1.76 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-5023ef2ff38488073670.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-020eb2794ab7d2ded87f.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-177412b8418bdebf043e.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-73e91dc4f2667a6a1a66.js"
],
Diff for link-020eb27..7d2ded87f.js
@@ -42,15 +42,15 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
c = t("elyg"),
u = t("nOHt"),
i = t("vNVm"),
- f = {};
- function l(e, n, t, r) {
+ l = {};
+ function f(e, n, t, r) {
if (e && (0, c.isLocalURL)(n)) {
e.prefetch(n, t, r).catch(function(e) {
0;
});
var o =
r && "undefined" !== typeof r.locale ? r.locale : e && e.locale;
- f[n + "%" + t + (o ? "%" + o : "")] = !0;
+ l[n + "%" + t + (o ? "%" + o : "")] = !0;
}
}
var s = function(e) {
@@ -75,11 +75,11 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
v = e.children,
h = e.replace,
y = e.shallow,
- g = e.scroll,
- _ = e.locale;
+ b = e.scroll,
+ g = e.locale;
"string" === typeof v && (v = a.default.createElement("a", null, v));
- var b = a.Children.only(v),
- m = b && "object" === typeof b && b.ref,
+ var _ = a.Children.only(v),
+ m = _ && "object" === typeof _ && _.ref,
w = (0, i.useIntersection)({ rootMargin: "200px" }),
E = r(w, 2),
L = E[0],
@@ -97,18 +97,18 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
(0, a.useEffect)(
function() {
var e = M && n && (0, c.isLocalURL)(p),
- r = "undefined" !== typeof _ ? _ : t && t.locale,
- o = f[p + "%" + d + (r ? "%" + r : "")];
- e && !o && l(t, p, d, { locale: r });
+ r = "undefined" !== typeof g ? g : t && t.locale,
+ o = l[p + "%" + d + (r ? "%" + r : "")];
+ e && !o && f(t, p, d, { locale: r });
},
- [d, p, M, _, n, t]
+ [d, p, M, g, n, t]
);
var I = {
ref: k,
onClick: function(e) {
- b.props &&
- "function" === typeof b.props.onClick &&
- b.props.onClick(e),
+ _.props &&
+ "function" === typeof _.props.onClick &&
+ _.props.onClick(e),
e.defaultPrevented ||
(function(e, n, t, r, o, a, u, i) {
("A" !== e.currentTarget.nodeName ||
@@ -133,19 +133,19 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
}).then(function(e) {
e && u && document.body.focus();
}));
- })(e, t, p, d, h, y, g, _);
+ })(e, t, p, d, h, y, b, g);
},
onMouseEnter: function(e) {
(0, c.isLocalURL)(p) &&
- (b.props &&
- "function" === typeof b.props.onMouseEnter &&
- b.props.onMouseEnter(e),
- l(t, p, d, { priority: !0 }));
+ (_.props &&
+ "function" === typeof _.props.onMouseEnter &&
+ _.props.onMouseEnter(e),
+ f(t, p, d, { priority: !0 }));
}
};
- if (e.passHref || ("a" === b.type && !("href" in b.props))) {
- var N = "undefined" !== typeof _ ? _ : t && t.locale,
- O =
+ if (e.passHref || ("a" === _.type && !("href" in _.props))) {
+ var N = "undefined" !== typeof g ? g : t && t.locale,
+ C =
t &&
t.isLocaleDomain &&
(0, c.getDomainLocale)(
@@ -155,37 +155,36 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
t && t.domainLocales
);
I.href =
- O ||
+ C ||
(0, c.addBasePath)((0, c.addLocale)(d, N, t && t.defaultLocale));
}
- return a.default.cloneElement(b, I);
+ return a.default.cloneElement(_, I);
};
n.default = s;
},
vNVm: function(e, n, t) {
"use strict";
- var r = t("J4zp"),
- o = t("TqRt");
+ var r = t("J4zp");
(n.__esModule = !0),
(n.useIntersection = function(e) {
var n = e.rootMargin,
- t = e.disabled || !u,
- o = (0, a.useRef)(),
- f = (0, a.useState)(!1),
- l = r(f, 2),
- s = l[0],
- p = l[1],
- d = (0, a.useCallback)(
+ t = e.disabled || !c,
+ i = (0, o.useRef)(),
+ l = (0, o.useState)(!1),
+ f = r(l, 2),
+ s = f[0],
+ p = f[1],
+ d = (0, o.useCallback)(
function(e) {
- o.current && (o.current(), (o.current = void 0)),
+ i.current && (i.current(), (i.current = void 0)),
t ||
s ||
(e &&
e.tagName &&
- (o.current = (function(e, n, t) {
+ (i.current = (function(e, n, t) {
var r = (function(e) {
var n = e.rootMargin || "",
- t = i.get(n);
+ t = u.get(n);
if (t) return t;
var r = new Map(),
o = new IntersectionObserver(function(e) {
@@ -198,7 +197,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
});
}, e);
return (
- i.set(
+ u.set(
n,
(t = { id: n, observer: o, elements: r })
),
@@ -214,7 +213,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
function() {
c.delete(e),
a.unobserve(e),
- 0 === c.size && (a.disconnect(), i.delete(o));
+ 0 === c.size && (a.disconnect(), u.delete(o));
}
);
})(
@@ -228,23 +227,26 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
[t, n, s]
);
return (
- (0, a.useEffect)(
+ (0, o.useEffect)(
function() {
- u ||
- s ||
- (0, c.default)(function() {
+ if (!c && !s) {
+ var e = (0, a.requestIdleCallback)(function() {
return p(!0);
});
+ return function() {
+ return (0, a.cancelIdleCallback)(e);
+ };
+ }
},
[s]
),
[d, s]
);
});
- var a = t("q1tI"),
- c = o(t("0G5g")),
- u = "undefined" !== typeof IntersectionObserver;
- var i = new Map();
+ var o = t("q1tI"),
+ a = t("0G5g"),
+ c = "undefined" !== typeof IntersectionObserver;
+ var u = new Map();
}
},
[["V8Sf", 0, 1, 2]]
Diff for 677f882d2ed8..df2824c01.js
@@ -30,7 +30,8 @@
},
"0G5g": function(t, e, r) {
"use strict";
- (e.__esModule = !0), (e.default = void 0);
+ (e.__esModule = !0),
+ (e.cancelIdleCallback = e.requestIdleCallback = void 0);
var n =
("undefined" !== typeof self && self.requestIdleCallback) ||
function(t) {
@@ -44,7 +45,13 @@
});
}, 1);
};
- e.default = n;
+ e.requestIdleCallback = n;
+ var o =
+ ("undefined" !== typeof self && self.cancelIdleCallback) ||
+ function(t) {
+ return clearTimeout(t);
+ };
+ e.cancelIdleCallback = o;
},
"284h": function(t, e, r) {
var n = r("cDf5");
@@ -265,7 +272,7 @@
(e.getClientBuildManifest = p),
(e.default = void 0);
i(r("Lab5"));
- var u = i(r("0G5g"));
+ var u = r("0G5g");
function c(t, e, r) {
var n,
o = e.get(t);
@@ -299,7 +306,7 @@
}
function h(t, e) {
return new Promise(function(r, n) {
- return (0, u.default)(function() {
+ return (0, u.requestIdleCallback)(function() {
return setTimeout(function() {
return n(e);
}, t);
@@ -520,7 +527,7 @@
);
})
.then(function() {
- (0, u.default)(function() {
+ (0, u.requestIdleCallback)(function() {
return n.loadRoute(e);
});
})
@@ -714,9 +721,9 @@
}),
(e.addLocale = b),
(e.delLocale = _),
- (e.hasBasePath = P),
- (e.addBasePath = S),
- (e.delBasePath = k),
+ (e.hasBasePath = k),
+ (e.addBasePath = P),
+ (e.delBasePath = S),
(e.isLocalURL = E),
(e.interpolateAs = R),
(e.resolveHref = O),
@@ -748,10 +755,10 @@
r = t.indexOf("#");
return (e > -1 || r > -1) && (t = t.substring(0, e > -1 ? e : r)), t;
}
- function P(t) {
+ function k(t) {
return "" === (t = x(t)) || t.startsWith("/");
}
- function S(t) {
+ function P(t) {
return (function(t, e) {
return e && t.startsWith("/")
? "/" === t
@@ -760,7 +767,7 @@
: t;
})(t, "");
}
- function k(t) {
+ function S(t) {
return (
(t = t.slice("".length)).startsWith("/") || (t = "/".concat(t)), t
);
@@ -770,7 +777,7 @@
try {
var e = (0, h.getLocationOrigin)(),
r = new URL(t, e);
- return r.origin === e && P(r.pathname);
+ return r.origin === e && k(r.pathname);
} catch (n) {
return !1;
}
@@ -849,7 +856,7 @@
var e = (0, h.getLocationOrigin)();
return t.startsWith(e) ? t.substring(e.length) : t;
}
- function j(t, e, r) {
+ function I(t, e, r) {
var n = O(t.pathname, e, !0),
o = u(n, 2),
a = o[0],
@@ -858,18 +865,18 @@
s = a.startsWith(c),
l = i && i.startsWith(c);
(a = C(a)), (i = i ? C(i) : i);
- var f = s ? a : S(a),
+ var f = s ? a : P(a),
p = r ? C(O(t.pathname, r)) : i || a;
- return { url: f, as: l ? p : S(p) };
+ return { url: f, as: l ? p : P(p) };
}
- var T = Symbol("SSG_DATA_NOT_FOUND");
- function I(t, e) {
+ var j = Symbol("SSG_DATA_NOT_FOUND");
+ function T(t, e) {
return fetch(t, { credentials: "same-origin" }).then(function(r) {
if (!r.ok) {
- if (e > 1 && r.status >= 500) return I(t, e - 1);
+ if (e > 1 && r.status >= 500) return T(t, e - 1);
if (404 === r.status)
return r.json().then(function(t) {
- if (t.notFound) return { notFound: T };
+ if (t.notFound) return { notFound: j };
throw new Error("Failed to load static props");
});
throw new Error("Failed to load static props");
@@ -878,7 +885,7 @@
});
}
function A(t, e) {
- return I(t, e ? 3 : 1).catch(function(t) {
+ return T(t, e ? 3 : 1).catch(function(t) {
throw (e || (0, s.markAssetError)(t), t);
});
}
@@ -948,7 +955,7 @@
s = i.query;
i.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(c), query: s }),
+ (0, h.formatWithValidation)({ pathname: P(c), query: s }),
(0, h.getURL)()
);
}
@@ -986,7 +993,7 @@
"//" !== n.substr(0, 2) &&
this.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(e), query: r }),
+ (0, h.formatWithValidation)({ pathname: P(e), query: r }),
(0, h.getURL)(),
{ locale: w }
),
@@ -1013,7 +1020,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {};
- var n = j(this, t, e);
+ var n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("pushState", t, e, r)
);
@@ -1026,7 +1033,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {},
- n = j(this, t, e);
+ n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("replaceState", t, e, r)
);
@@ -1045,15 +1052,15 @@
x,
O,
C,
- I,
+ T,
A,
D,
M,
N,
U,
W,
- F,
q,
+ F,
G,
B,
H,
@@ -1100,14 +1107,14 @@
this._inFlightRoute,
g
),
- (a = S(
+ (a = P(
b(
- P(a) ? k(a) : a,
+ k(a) ? S(a) : a,
i.locale,
this.defaultLocale
)
)),
- (w = _(P(a) ? k(a) : a, this.locale)),
+ (w = _(k(a) ? S(a) : a, this.locale)),
(this._inFlightRoute = a),
i._h || !this.onlyAHashChange(w))
) {
@@ -1127,7 +1134,7 @@
return (
(x = (0, d.parseRelativeUrl)(o)),
(C = (O = x).pathname),
- (I = O.query),
+ (T = O.query),
(e.prev = 36),
(e.next = 39),
this.pageLoader.getPageList()
@@ -1154,7 +1161,7 @@
((C = x.pathname),
(o = (0, h.formatWithValidation)(x))),
(C = C
- ? (0, c.removePathTrailingSlash)(k(C))
+ ? (0, c.removePathTrailingSlash)(S(C))
: C),
this.urlIsNew(w) || f || (r = "replaceState"),
(M = (0, c.removePathTrailingSlash)(C)),
@@ -1173,7 +1180,7 @@
);
case 62:
if (
- ((N = _(k(N), this.locale)),
+ ((N = _(S(N), this.locale)),
!(0, p.isDynamicRoute)(M))
) {
e.next = 78;
@@ -1182,20 +1189,20 @@
if (
((U = (0, d.parseRelativeUrl)(N)),
(W = U.pathname),
- (F = (0, m.getRouteRegex)(M)),
- (q = (0, y.getRouteMatcher)(F)(W)),
- (B = (G = M === W) ? R(M, W, I) : {}),
- q && (!G || B.result))
+ (q = (0, m.getRouteRegex)(M)),
+ (F = (0, y.getRouteMatcher)(q)(W)),
+ (B = (G = M === W) ? R(M, W, T) : {}),
+ F && (!G || B.result))
) {
e.next = 77;
break;
}
if (
!(
- (H = Object.keys(F.groups).filter(function(
+ (H = Object.keys(q.groups).filter(function(
t
) {
- return !I[t];
+ return !T[t];
})).length > 0
)
) {
@@ -1233,16 +1240,16 @@
? (a = (0, h.formatWithValidation)(
Object.assign({}, U, {
pathname: B.result,
- query: L(I, B.params)
+ query: L(T, B.params)
})
))
- : Object.assign(I, q);
+ : Object.assign(T, F);
case 78:
return (
t.events.emit("routeChangeStart", a, g),
(e.prev = 79),
(e.next = 82),
- this.getRouteInfo(M, C, I, a, N, g)
+ this.getRouteInfo(M, C, T, a, N, g)
);
case 82:
if (
@@ -1275,7 +1282,7 @@
break;
}
return (
- (K = j(this, Q, Q)),
+ (K = I(this, Q, Q)),
(tt = K.url),
(et = K.as),
e.abrupt("return", this.change(r, tt, et, i))
@@ -1286,7 +1293,7 @@
e.abrupt("return", new Promise(function() {}))
);
case 95:
- if (J.notFound !== T) {
+ if (J.notFound !== j) {
e.next = 108;
break;
}
@@ -1305,7 +1312,7 @@
case 105:
return (
(e.next = 107),
- this.getRouteInfo(rt, rt, I, a, N, {
+ this.getRouteInfo(rt, rt, T, a, N, {
shallow: !1
})
);
@@ -1320,7 +1327,7 @@
this.set(
M,
C,
- I,
+ T,
w,
V,
u || (nt || !i.scroll ? null : { x: 0, y: 0 })
@@ -1680,7 +1687,7 @@
arguments[2],
n = t.pathname,
o = (0, c.removePathTrailingSlash)(
- (0, l.denormalizePagePath)(r ? k(n) : n)
+ (0, l.denormalizePagePath)(r ? S(n) : n)
);
return (
"/404" === o ||
@@ -1691,7 +1698,7 @@
(0, p.isDynamicRoute)(e) &&
(0, m.getRouteRegex)(e).re.test(o)
)
- return (t.pathname = r ? S(e) : e), !0;
+ return (t.pathname = r ? P(e) : e), !0;
}),
(t.pathname = (0, c.removePathTrailingSlash)(t.pathname))),
t
@@ -2112,7 +2119,7 @@
}
try {
c({}, "");
- } catch (j) {
+ } catch (I) {
c = function(t, e, r) {
return (t[e] = r);
};
@@ -2133,7 +2140,7 @@
for (r.method = o, r.arg = a; ; ) {
var i = r.delegate;
if (i) {
- var u = k(i, r);
+ var u = S(i, r);
if (u) {
if (u === v) continue;
return u;
@@ -2161,8 +2168,8 @@
function l(t, e, r) {
try {
return { type: "normal", arg: t.call(e, r) };
- } catch (j) {
- return { type: "throw", arg: j };
+ } catch (I) {
+ return { type: "throw", arg: I };
}
}
t.wrap = s;
@@ -2182,14 +2189,14 @@
_ = b && b(b(O([])));
_ && _ !== r && n.call(_, a) && (w = _);
var x = (g.prototype = y.prototype = Object.create(w));
- function P(t) {
+ function k(t) {
["next", "throw", "return"].forEach(function(e) {
c(t, e, function(t) {
return this._invoke(e, t);
});
});
}
- function S(t, e) {
+ function P(t, e) {
function r(o, a, i, u) {
var c = l(t[o], t, a);
if ("throw" !== c.type) {
@@ -2225,7 +2232,7 @@
return (o = o ? o.then(a, a) : a());
};
}
- function k(t, r) {
+ function S(t, r) {
var n = t.iterator[r.method];
if (n === e) {
if (((r.delegate = null), "throw" === r.method)) {
@@ -2233,7 +2240,7 @@
t.iterator.return &&
((r.method = "return"),
(r.arg = e),
- k(t, r),
+ S(t, r),
"throw" === r.method)
)
return v;
@@ -2321,21 +2328,21 @@
(t.awrap = function(t) {
return { __await: t };
}),
- P(S.prototype),
- (S.prototype[i] = function() {
+ k(P.prototype),
+ (P.prototype[i] = function() {
return this;
}),
- (t.AsyncIterator = S),
+ (t.AsyncIterator = P),
(t.async = function(e, r, n, o, a) {
void 0 === a && (a = Promise);
- var i = new S(s(e, r, n, o), a);
+ var i = new P(s(e, r, n, o), a);
return t.isGeneratorFunction(r)
? i
: i.next().then(function(t) {
return t.done ? t.value : i.next();
});
}),
- P(x),
+ k(x),
c(x, u, "Generator"),
(x[a] = function() {
return this;
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "QbFPZ6XBuCuVrtnyaskGZ",
+ "buildId": "By_w-47o7Kjt2DiOXSUdc",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/QbFPZ6XBuCuVrtnyaskGZ/_buildManifest.js"
+ src="/_next/static/By_w-47o7Kjt2DiOXSUdc/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/QbFPZ6XBuCuVrtnyaskGZ/_ssgManifest.js"
+ src="/_next/static/By_w-47o7Kjt2DiOXSUdc/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ href="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
as="script"
/>
</head>
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "QbFPZ6XBuCuVrtnyaskGZ",
+ "buildId": "By_w-47o7Kjt2DiOXSUdc",
"isFallback": false,
"gip": true
}
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -78,15 +78,15 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ src="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
async=""
></script>
<script
- src="/_next/static/QbFPZ6XBuCuVrtnyaskGZ/_buildManifest.js"
+ src="/_next/static/By_w-47o7Kjt2DiOXSUdc/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/QbFPZ6XBuCuVrtnyaskGZ/_ssgManifest.js"
+ src="/_next/static/By_w-47o7Kjt2DiOXSUdc/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "QbFPZ6XBuCuVrtnyaskGZ",
+ "buildId": "By_w-47o7Kjt2DiOXSUdc",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/QbFPZ6XBuCuVrtnyaskGZ/_buildManifest.js"
+ src="/_next/static/By_w-47o7Kjt2DiOXSUdc/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/QbFPZ6XBuCuVrtnyaskGZ/_ssgManifest.js"
+ src="/_next/static/By_w-47o7Kjt2DiOXSUdc/_ssgManifest.js"
async=""
></script>
</body>
Failing test suitesCommit: 05e52fd test/integration/size-limit/test/index.test.js
Expand output● Production response size › should not increase the overall response size of default build
|
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 12.4s | 12.2s | -179ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.273 | 2.21 | -0.06 |
/ avg req/sec | 1099.82 | 1131.01 | +31.19 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.559 | 1.632 | |
/error-in-render avg req/sec | 1603.96 | 1531.93 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | 1.67 kB | |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 614 B | 612 B | -2 B |
link.html gzip | 620 B | 619 B | -1 B |
withRouter.html gzip | 607 B | 607 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-e732be88e7750c8b99f5.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-df11b317aadf9fd402f9.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-1758aa74927b71637af8.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-b3467c130a6d01a76dae.js"
],
Diff for link-df11b31..f9fd402f9.js
@@ -321,16 +321,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
var _slicedToArray = __webpack_require__("J4zp");
- var _interopRequireDefault = __webpack_require__("TqRt");
-
exports.__esModule = true;
exports.useIntersection = useIntersection;
var _react = __webpack_require__("q1tI");
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- );
+ var _requestIdleCallback = __webpack_require__("0G5g");
var hasIntersectionObserver = typeof IntersectionObserver !== "undefined";
@@ -371,10 +367,17 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
(0, _react.useEffect)(
function() {
if (!hasIntersectionObserver) {
- if (!visible)
- (0, _requestIdleCallback["default"])(function() {
+ if (!visible) {
+ var idleCallback = (0,
+ _requestIdleCallback.requestIdleCallback)(function() {
return setVisible(true);
});
+ return function() {
+ return (0, _requestIdleCallback.cancelIdleCallback)(
+ idleCallback
+ );
+ };
+ }
}
},
[visible]
Diff for 677f882d2ed8..b246b9f81.js
@@ -59,7 +59,7 @@
"use strict";
exports.__esModule = true;
- exports["default"] = void 0;
+ exports.cancelIdleCallback = exports.requestIdleCallback = void 0;
var requestIdleCallback =
(typeof self !== "undefined" && self.requestIdleCallback) ||
@@ -75,8 +75,15 @@
}, 1);
};
- var _default = requestIdleCallback;
- exports["default"] = _default;
+ exports.requestIdleCallback = requestIdleCallback;
+
+ var cancelIdleCallback =
+ (typeof self !== "undefined" && self.cancelIdleCallback) ||
+ function(id) {
+ return clearTimeout(id);
+ };
+
+ exports.cancelIdleCallback = cancelIdleCallback;
/***/
},
@@ -476,9 +483,7 @@
__webpack_require__("Lab5")
);
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- ); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
+ var _requestIdleCallback = __webpack_require__("0G5g"); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
// considers as "Good" time-to-interactive. We must assume something went
// wrong beyond this point, and then fall-back to a full page transition to
// show the user something of value.
@@ -588,7 +593,7 @@
function idleTimeout(ms, err) {
return new Promise(function(_resolve, reject) {
- return (0, _requestIdleCallback["default"])(function() {
+ return (0, _requestIdleCallback.requestIdleCallback)(function() {
return setTimeout(function() {
return reject(err);
}, ms);
@@ -845,7 +850,7 @@
);
})
.then(function() {
- (0, _requestIdleCallback["default"])(function() {
+ (0, _requestIdleCallback.requestIdleCallback)(function() {
return _this2.loadRoute(route);
});
})
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ href="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
as="script"
/>
</head>
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
@@ -78,7 +78,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ src="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 14.3s | 14.6s | |
nodeModulesSize | 69.8 MB | 69.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..5cb0.js gzip | N/A | 13.1 kB | N/A |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | N/A | N/A |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
link-177412b..043e.js gzip | N/A | 1.67 kB | N/A |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_error.js | 1.01 MB | 1.01 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
amp.amp.html | 10.4 kB | 10.4 kB | ✓ |
amp.html | 1.86 kB | 1.86 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1.01 MB | 1.01 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | |
routerDirect.js | 1.06 MB | 1.06 MB | |
withRouter.js | 1.06 MB | 1.06 MB | |
Overall change | 5.2 MB | 5.2 MB |
Webpack 5 Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 14.4s | 14.8s | |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.354 | 2.208 | -0.15 |
/ avg req/sec | 1062.18 | 1132.21 | +70.03 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.673 | 1.594 | -0.08 |
/error-in-render avg req/sec | 1494.18 | 1567.93 | +73.75 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
597-913d7a8f..1f0e.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 6.58 kB | 6.58 kB | ✓ |
webpack-HASH.js gzip | 954 B | 954 B | ✓ |
Overall change | 59.9 kB | 59.9 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-6e0a903..b885.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-9e190..f9d6.js gzip | 3.38 kB | 3.38 kB | ✓ |
amp-7fd79cc4..99ee.js gzip | 538 B | 538 B | ✓ |
hooks-f7e199..11b9.js gzip | 904 B | 904 B | ✓ |
index-3dc22c..ffbb.js gzip | 232 B | 232 B | ✓ |
link-b960f55..1c2e.js gzip | 1.63 kB | 1.66 kB | |
routerDirect..323a.js gzip | 308 B | 308 B | ✓ |
withRouter-a..2ef8.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.56 kB | 8.59 kB |
Client Build Manifests
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
Overall change | 322 B | 322 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 586 B | 584 B | -2 B |
link.html gzip | 593 B | 593 B | ✓ |
withRouter.html gzip | 580 B | 579 B | -1 B |
Overall change | 1.76 kB | 1.76 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-5023ef2ff38488073670.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-020eb2794ab7d2ded87f.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-177412b8418bdebf043e.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-73e91dc4f2667a6a1a66.js"
],
Diff for link-020eb27..7d2ded87f.js
@@ -42,15 +42,15 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
c = t("elyg"),
u = t("nOHt"),
i = t("vNVm"),
- f = {};
- function l(e, n, t, r) {
+ l = {};
+ function f(e, n, t, r) {
if (e && (0, c.isLocalURL)(n)) {
e.prefetch(n, t, r).catch(function(e) {
0;
});
var o =
r && "undefined" !== typeof r.locale ? r.locale : e && e.locale;
- f[n + "%" + t + (o ? "%" + o : "")] = !0;
+ l[n + "%" + t + (o ? "%" + o : "")] = !0;
}
}
var s = function(e) {
@@ -75,11 +75,11 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
v = e.children,
h = e.replace,
y = e.shallow,
- g = e.scroll,
- _ = e.locale;
+ b = e.scroll,
+ g = e.locale;
"string" === typeof v && (v = a.default.createElement("a", null, v));
- var b = a.Children.only(v),
- m = b && "object" === typeof b && b.ref,
+ var _ = a.Children.only(v),
+ m = _ && "object" === typeof _ && _.ref,
w = (0, i.useIntersection)({ rootMargin: "200px" }),
E = r(w, 2),
L = E[0],
@@ -97,18 +97,18 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
(0, a.useEffect)(
function() {
var e = M && n && (0, c.isLocalURL)(p),
- r = "undefined" !== typeof _ ? _ : t && t.locale,
- o = f[p + "%" + d + (r ? "%" + r : "")];
- e && !o && l(t, p, d, { locale: r });
+ r = "undefined" !== typeof g ? g : t && t.locale,
+ o = l[p + "%" + d + (r ? "%" + r : "")];
+ e && !o && f(t, p, d, { locale: r });
},
- [d, p, M, _, n, t]
+ [d, p, M, g, n, t]
);
var I = {
ref: k,
onClick: function(e) {
- b.props &&
- "function" === typeof b.props.onClick &&
- b.props.onClick(e),
+ _.props &&
+ "function" === typeof _.props.onClick &&
+ _.props.onClick(e),
e.defaultPrevented ||
(function(e, n, t, r, o, a, u, i) {
("A" !== e.currentTarget.nodeName ||
@@ -133,19 +133,19 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
}).then(function(e) {
e && u && document.body.focus();
}));
- })(e, t, p, d, h, y, g, _);
+ })(e, t, p, d, h, y, b, g);
},
onMouseEnter: function(e) {
(0, c.isLocalURL)(p) &&
- (b.props &&
- "function" === typeof b.props.onMouseEnter &&
- b.props.onMouseEnter(e),
- l(t, p, d, { priority: !0 }));
+ (_.props &&
+ "function" === typeof _.props.onMouseEnter &&
+ _.props.onMouseEnter(e),
+ f(t, p, d, { priority: !0 }));
}
};
- if (e.passHref || ("a" === b.type && !("href" in b.props))) {
- var N = "undefined" !== typeof _ ? _ : t && t.locale,
- O =
+ if (e.passHref || ("a" === _.type && !("href" in _.props))) {
+ var N = "undefined" !== typeof g ? g : t && t.locale,
+ C =
t &&
t.isLocaleDomain &&
(0, c.getDomainLocale)(
@@ -155,37 +155,36 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
t && t.domainLocales
);
I.href =
- O ||
+ C ||
(0, c.addBasePath)((0, c.addLocale)(d, N, t && t.defaultLocale));
}
- return a.default.cloneElement(b, I);
+ return a.default.cloneElement(_, I);
};
n.default = s;
},
vNVm: function(e, n, t) {
"use strict";
- var r = t("J4zp"),
- o = t("TqRt");
+ var r = t("J4zp");
(n.__esModule = !0),
(n.useIntersection = function(e) {
var n = e.rootMargin,
- t = e.disabled || !u,
- o = (0, a.useRef)(),
- f = (0, a.useState)(!1),
- l = r(f, 2),
- s = l[0],
- p = l[1],
- d = (0, a.useCallback)(
+ t = e.disabled || !c,
+ i = (0, o.useRef)(),
+ l = (0, o.useState)(!1),
+ f = r(l, 2),
+ s = f[0],
+ p = f[1],
+ d = (0, o.useCallback)(
function(e) {
- o.current && (o.current(), (o.current = void 0)),
+ i.current && (i.current(), (i.current = void 0)),
t ||
s ||
(e &&
e.tagName &&
- (o.current = (function(e, n, t) {
+ (i.current = (function(e, n, t) {
var r = (function(e) {
var n = e.rootMargin || "",
- t = i.get(n);
+ t = u.get(n);
if (t) return t;
var r = new Map(),
o = new IntersectionObserver(function(e) {
@@ -198,7 +197,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
});
}, e);
return (
- i.set(
+ u.set(
n,
(t = { id: n, observer: o, elements: r })
),
@@ -214,7 +213,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
function() {
c.delete(e),
a.unobserve(e),
- 0 === c.size && (a.disconnect(), i.delete(o));
+ 0 === c.size && (a.disconnect(), u.delete(o));
}
);
})(
@@ -228,23 +227,26 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
[t, n, s]
);
return (
- (0, a.useEffect)(
+ (0, o.useEffect)(
function() {
- u ||
- s ||
- (0, c.default)(function() {
+ if (!c && !s) {
+ var e = (0, a.requestIdleCallback)(function() {
return p(!0);
});
+ return function() {
+ return (0, a.cancelIdleCallback)(e);
+ };
+ }
},
[s]
),
[d, s]
);
});
- var a = t("q1tI"),
- c = o(t("0G5g")),
- u = "undefined" !== typeof IntersectionObserver;
- var i = new Map();
+ var o = t("q1tI"),
+ a = t("0G5g"),
+ c = "undefined" !== typeof IntersectionObserver;
+ var u = new Map();
}
},
[["V8Sf", 0, 1, 2]]
Diff for 677f882d2ed8..df2824c01.js
@@ -30,7 +30,8 @@
},
"0G5g": function(t, e, r) {
"use strict";
- (e.__esModule = !0), (e.default = void 0);
+ (e.__esModule = !0),
+ (e.cancelIdleCallback = e.requestIdleCallback = void 0);
var n =
("undefined" !== typeof self && self.requestIdleCallback) ||
function(t) {
@@ -44,7 +45,13 @@
});
}, 1);
};
- e.default = n;
+ e.requestIdleCallback = n;
+ var o =
+ ("undefined" !== typeof self && self.cancelIdleCallback) ||
+ function(t) {
+ return clearTimeout(t);
+ };
+ e.cancelIdleCallback = o;
},
"284h": function(t, e, r) {
var n = r("cDf5");
@@ -265,7 +272,7 @@
(e.getClientBuildManifest = p),
(e.default = void 0);
i(r("Lab5"));
- var u = i(r("0G5g"));
+ var u = r("0G5g");
function c(t, e, r) {
var n,
o = e.get(t);
@@ -299,7 +306,7 @@
}
function h(t, e) {
return new Promise(function(r, n) {
- return (0, u.default)(function() {
+ return (0, u.requestIdleCallback)(function() {
return setTimeout(function() {
return n(e);
}, t);
@@ -520,7 +527,7 @@
);
})
.then(function() {
- (0, u.default)(function() {
+ (0, u.requestIdleCallback)(function() {
return n.loadRoute(e);
});
})
@@ -714,9 +721,9 @@
}),
(e.addLocale = b),
(e.delLocale = _),
- (e.hasBasePath = P),
- (e.addBasePath = S),
- (e.delBasePath = k),
+ (e.hasBasePath = k),
+ (e.addBasePath = P),
+ (e.delBasePath = S),
(e.isLocalURL = E),
(e.interpolateAs = R),
(e.resolveHref = O),
@@ -748,10 +755,10 @@
r = t.indexOf("#");
return (e > -1 || r > -1) && (t = t.substring(0, e > -1 ? e : r)), t;
}
- function P(t) {
+ function k(t) {
return "" === (t = x(t)) || t.startsWith("/");
}
- function S(t) {
+ function P(t) {
return (function(t, e) {
return e && t.startsWith("/")
? "/" === t
@@ -760,7 +767,7 @@
: t;
})(t, "");
}
- function k(t) {
+ function S(t) {
return (
(t = t.slice("".length)).startsWith("/") || (t = "/".concat(t)), t
);
@@ -770,7 +777,7 @@
try {
var e = (0, h.getLocationOrigin)(),
r = new URL(t, e);
- return r.origin === e && P(r.pathname);
+ return r.origin === e && k(r.pathname);
} catch (n) {
return !1;
}
@@ -849,7 +856,7 @@
var e = (0, h.getLocationOrigin)();
return t.startsWith(e) ? t.substring(e.length) : t;
}
- function j(t, e, r) {
+ function I(t, e, r) {
var n = O(t.pathname, e, !0),
o = u(n, 2),
a = o[0],
@@ -858,18 +865,18 @@
s = a.startsWith(c),
l = i && i.startsWith(c);
(a = C(a)), (i = i ? C(i) : i);
- var f = s ? a : S(a),
+ var f = s ? a : P(a),
p = r ? C(O(t.pathname, r)) : i || a;
- return { url: f, as: l ? p : S(p) };
+ return { url: f, as: l ? p : P(p) };
}
- var T = Symbol("SSG_DATA_NOT_FOUND");
- function I(t, e) {
+ var j = Symbol("SSG_DATA_NOT_FOUND");
+ function T(t, e) {
return fetch(t, { credentials: "same-origin" }).then(function(r) {
if (!r.ok) {
- if (e > 1 && r.status >= 500) return I(t, e - 1);
+ if (e > 1 && r.status >= 500) return T(t, e - 1);
if (404 === r.status)
return r.json().then(function(t) {
- if (t.notFound) return { notFound: T };
+ if (t.notFound) return { notFound: j };
throw new Error("Failed to load static props");
});
throw new Error("Failed to load static props");
@@ -878,7 +885,7 @@
});
}
function A(t, e) {
- return I(t, e ? 3 : 1).catch(function(t) {
+ return T(t, e ? 3 : 1).catch(function(t) {
throw (e || (0, s.markAssetError)(t), t);
});
}
@@ -948,7 +955,7 @@
s = i.query;
i.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(c), query: s }),
+ (0, h.formatWithValidation)({ pathname: P(c), query: s }),
(0, h.getURL)()
);
}
@@ -986,7 +993,7 @@
"//" !== n.substr(0, 2) &&
this.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(e), query: r }),
+ (0, h.formatWithValidation)({ pathname: P(e), query: r }),
(0, h.getURL)(),
{ locale: w }
),
@@ -1013,7 +1020,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {};
- var n = j(this, t, e);
+ var n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("pushState", t, e, r)
);
@@ -1026,7 +1033,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {},
- n = j(this, t, e);
+ n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("replaceState", t, e, r)
);
@@ -1045,15 +1052,15 @@
x,
O,
C,
- I,
+ T,
A,
D,
M,
N,
U,
W,
- F,
q,
+ F,
G,
B,
H,
@@ -1100,14 +1107,14 @@
this._inFlightRoute,
g
),
- (a = S(
+ (a = P(
b(
- P(a) ? k(a) : a,
+ k(a) ? S(a) : a,
i.locale,
this.defaultLocale
)
)),
- (w = _(P(a) ? k(a) : a, this.locale)),
+ (w = _(k(a) ? S(a) : a, this.locale)),
(this._inFlightRoute = a),
i._h || !this.onlyAHashChange(w))
) {
@@ -1127,7 +1134,7 @@
return (
(x = (0, d.parseRelativeUrl)(o)),
(C = (O = x).pathname),
- (I = O.query),
+ (T = O.query),
(e.prev = 36),
(e.next = 39),
this.pageLoader.getPageList()
@@ -1154,7 +1161,7 @@
((C = x.pathname),
(o = (0, h.formatWithValidation)(x))),
(C = C
- ? (0, c.removePathTrailingSlash)(k(C))
+ ? (0, c.removePathTrailingSlash)(S(C))
: C),
this.urlIsNew(w) || f || (r = "replaceState"),
(M = (0, c.removePathTrailingSlash)(C)),
@@ -1173,7 +1180,7 @@
);
case 62:
if (
- ((N = _(k(N), this.locale)),
+ ((N = _(S(N), this.locale)),
!(0, p.isDynamicRoute)(M))
) {
e.next = 78;
@@ -1182,20 +1189,20 @@
if (
((U = (0, d.parseRelativeUrl)(N)),
(W = U.pathname),
- (F = (0, m.getRouteRegex)(M)),
- (q = (0, y.getRouteMatcher)(F)(W)),
- (B = (G = M === W) ? R(M, W, I) : {}),
- q && (!G || B.result))
+ (q = (0, m.getRouteRegex)(M)),
+ (F = (0, y.getRouteMatcher)(q)(W)),
+ (B = (G = M === W) ? R(M, W, T) : {}),
+ F && (!G || B.result))
) {
e.next = 77;
break;
}
if (
!(
- (H = Object.keys(F.groups).filter(function(
+ (H = Object.keys(q.groups).filter(function(
t
) {
- return !I[t];
+ return !T[t];
})).length > 0
)
) {
@@ -1233,16 +1240,16 @@
? (a = (0, h.formatWithValidation)(
Object.assign({}, U, {
pathname: B.result,
- query: L(I, B.params)
+ query: L(T, B.params)
})
))
- : Object.assign(I, q);
+ : Object.assign(T, F);
case 78:
return (
t.events.emit("routeChangeStart", a, g),
(e.prev = 79),
(e.next = 82),
- this.getRouteInfo(M, C, I, a, N, g)
+ this.getRouteInfo(M, C, T, a, N, g)
);
case 82:
if (
@@ -1275,7 +1282,7 @@
break;
}
return (
- (K = j(this, Q, Q)),
+ (K = I(this, Q, Q)),
(tt = K.url),
(et = K.as),
e.abrupt("return", this.change(r, tt, et, i))
@@ -1286,7 +1293,7 @@
e.abrupt("return", new Promise(function() {}))
);
case 95:
- if (J.notFound !== T) {
+ if (J.notFound !== j) {
e.next = 108;
break;
}
@@ -1305,7 +1312,7 @@
case 105:
return (
(e.next = 107),
- this.getRouteInfo(rt, rt, I, a, N, {
+ this.getRouteInfo(rt, rt, T, a, N, {
shallow: !1
})
);
@@ -1320,7 +1327,7 @@
this.set(
M,
C,
- I,
+ T,
w,
V,
u || (nt || !i.scroll ? null : { x: 0, y: 0 })
@@ -1680,7 +1687,7 @@
arguments[2],
n = t.pathname,
o = (0, c.removePathTrailingSlash)(
- (0, l.denormalizePagePath)(r ? k(n) : n)
+ (0, l.denormalizePagePath)(r ? S(n) : n)
);
return (
"/404" === o ||
@@ -1691,7 +1698,7 @@
(0, p.isDynamicRoute)(e) &&
(0, m.getRouteRegex)(e).re.test(o)
)
- return (t.pathname = r ? S(e) : e), !0;
+ return (t.pathname = r ? P(e) : e), !0;
}),
(t.pathname = (0, c.removePathTrailingSlash)(t.pathname))),
t
@@ -2112,7 +2119,7 @@
}
try {
c({}, "");
- } catch (j) {
+ } catch (I) {
c = function(t, e, r) {
return (t[e] = r);
};
@@ -2133,7 +2140,7 @@
for (r.method = o, r.arg = a; ; ) {
var i = r.delegate;
if (i) {
- var u = k(i, r);
+ var u = S(i, r);
if (u) {
if (u === v) continue;
return u;
@@ -2161,8 +2168,8 @@
function l(t, e, r) {
try {
return { type: "normal", arg: t.call(e, r) };
- } catch (j) {
- return { type: "throw", arg: j };
+ } catch (I) {
+ return { type: "throw", arg: I };
}
}
t.wrap = s;
@@ -2182,14 +2189,14 @@
_ = b && b(b(O([])));
_ && _ !== r && n.call(_, a) && (w = _);
var x = (g.prototype = y.prototype = Object.create(w));
- function P(t) {
+ function k(t) {
["next", "throw", "return"].forEach(function(e) {
c(t, e, function(t) {
return this._invoke(e, t);
});
});
}
- function S(t, e) {
+ function P(t, e) {
function r(o, a, i, u) {
var c = l(t[o], t, a);
if ("throw" !== c.type) {
@@ -2225,7 +2232,7 @@
return (o = o ? o.then(a, a) : a());
};
}
- function k(t, r) {
+ function S(t, r) {
var n = t.iterator[r.method];
if (n === e) {
if (((r.delegate = null), "throw" === r.method)) {
@@ -2233,7 +2240,7 @@
t.iterator.return &&
((r.method = "return"),
(r.arg = e),
- k(t, r),
+ S(t, r),
"throw" === r.method)
)
return v;
@@ -2321,21 +2328,21 @@
(t.awrap = function(t) {
return { __await: t };
}),
- P(S.prototype),
- (S.prototype[i] = function() {
+ k(P.prototype),
+ (P.prototype[i] = function() {
return this;
}),
- (t.AsyncIterator = S),
+ (t.AsyncIterator = P),
(t.async = function(e, r, n, o, a) {
void 0 === a && (a = Promise);
- var i = new S(s(e, r, n, o), a);
+ var i = new P(s(e, r, n, o), a);
return t.isGeneratorFunction(r)
? i
: i.next().then(function(t) {
return t.done ? t.value : i.next();
});
}),
- P(x),
+ k(x),
c(x, u, "Generator"),
(x[a] = function() {
return this;
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "j1qAbO0rDpcr13kTLkcXu",
+ "buildId": "B7pQX6FAs6atPSYVzl34P",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/j1qAbO0rDpcr13kTLkcXu/_buildManifest.js"
+ src="/_next/static/B7pQX6FAs6atPSYVzl34P/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/j1qAbO0rDpcr13kTLkcXu/_ssgManifest.js"
+ src="/_next/static/B7pQX6FAs6atPSYVzl34P/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ href="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
as="script"
/>
</head>
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "j1qAbO0rDpcr13kTLkcXu",
+ "buildId": "B7pQX6FAs6atPSYVzl34P",
"isFallback": false,
"gip": true
}
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -78,15 +78,15 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ src="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
async=""
></script>
<script
- src="/_next/static/j1qAbO0rDpcr13kTLkcXu/_buildManifest.js"
+ src="/_next/static/B7pQX6FAs6atPSYVzl34P/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/j1qAbO0rDpcr13kTLkcXu/_ssgManifest.js"
+ src="/_next/static/B7pQX6FAs6atPSYVzl34P/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "j1qAbO0rDpcr13kTLkcXu",
+ "buildId": "B7pQX6FAs6atPSYVzl34P",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/j1qAbO0rDpcr13kTLkcXu/_buildManifest.js"
+ src="/_next/static/B7pQX6FAs6atPSYVzl34P/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/j1qAbO0rDpcr13kTLkcXu/_ssgManifest.js"
+ src="/_next/static/B7pQX6FAs6atPSYVzl34P/_ssgManifest.js"
async=""
></script>
</body>
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 12.2s | 11.9s | -258ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.263 | 2.222 | -0.04 |
/ avg req/sec | 1104.8 | 1124.89 | +20.09 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.561 | 1.616 | |
/error-in-render avg req/sec | 1601.1 | 1546.85 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | 1.67 kB | |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 614 B | 612 B | -2 B |
link.html gzip | 620 B | 619 B | -1 B |
withRouter.html gzip | 607 B | 607 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-e732be88e7750c8b99f5.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-df11b317aadf9fd402f9.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-1758aa74927b71637af8.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-b3467c130a6d01a76dae.js"
],
Diff for link-df11b31..f9fd402f9.js
@@ -321,16 +321,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
var _slicedToArray = __webpack_require__("J4zp");
- var _interopRequireDefault = __webpack_require__("TqRt");
-
exports.__esModule = true;
exports.useIntersection = useIntersection;
var _react = __webpack_require__("q1tI");
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- );
+ var _requestIdleCallback = __webpack_require__("0G5g");
var hasIntersectionObserver = typeof IntersectionObserver !== "undefined";
@@ -371,10 +367,17 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
(0, _react.useEffect)(
function() {
if (!hasIntersectionObserver) {
- if (!visible)
- (0, _requestIdleCallback["default"])(function() {
+ if (!visible) {
+ var idleCallback = (0,
+ _requestIdleCallback.requestIdleCallback)(function() {
return setVisible(true);
});
+ return function() {
+ return (0, _requestIdleCallback.cancelIdleCallback)(
+ idleCallback
+ );
+ };
+ }
}
},
[visible]
Diff for 677f882d2ed8..b246b9f81.js
@@ -59,7 +59,7 @@
"use strict";
exports.__esModule = true;
- exports["default"] = void 0;
+ exports.cancelIdleCallback = exports.requestIdleCallback = void 0;
var requestIdleCallback =
(typeof self !== "undefined" && self.requestIdleCallback) ||
@@ -75,8 +75,15 @@
}, 1);
};
- var _default = requestIdleCallback;
- exports["default"] = _default;
+ exports.requestIdleCallback = requestIdleCallback;
+
+ var cancelIdleCallback =
+ (typeof self !== "undefined" && self.cancelIdleCallback) ||
+ function(id) {
+ return clearTimeout(id);
+ };
+
+ exports.cancelIdleCallback = cancelIdleCallback;
/***/
},
@@ -476,9 +483,7 @@
__webpack_require__("Lab5")
);
- var _requestIdleCallback = _interopRequireDefault(
- __webpack_require__("0G5g")
- ); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
+ var _requestIdleCallback = __webpack_require__("0G5g"); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive
// considers as "Good" time-to-interactive. We must assume something went
// wrong beyond this point, and then fall-back to a full page transition to
// show the user something of value.
@@ -588,7 +593,7 @@
function idleTimeout(ms, err) {
return new Promise(function(_resolve, reject) {
- return (0, _requestIdleCallback["default"])(function() {
+ return (0, _requestIdleCallback.requestIdleCallback)(function() {
return setTimeout(function() {
return reject(err);
}, ms);
@@ -845,7 +850,7 @@
);
})
.then(function() {
- (0, _requestIdleCallback["default"])(function() {
+ (0, _requestIdleCallback.requestIdleCallback)(function() {
return _this2.loadRoute(route);
});
})
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ href="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
as="script"
/>
</head>
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
@@ -78,7 +78,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-df11b317aadf9fd402f9.js"
+ src="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
as="script"
/>
<link
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0d8e916e638b246b9f81.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.7cb49231e31fb73c6f26.js"
async=""
></script>
<script
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 14.1s | 14s | -64ms |
nodeModulesSize | 69.8 MB | 69.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
677f882d2ed8..4c01.js gzip | 13.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..5cb0.js gzip | N/A | 13.1 kB | N/A |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-020eb27..d87f.js gzip | 1.64 kB | N/A | N/A |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
link-177412b..043e.js gzip | N/A | 1.67 kB | N/A |
Overall change | 8.64 kB | 8.66 kB |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 348 B | 347 B | -1 B |
Overall change | 348 B | 347 B | -1 B |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_error.js | 1.01 MB | 1.01 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
amp.amp.html | 10.4 kB | 10.4 kB | ✓ |
amp.html | 1.86 kB | 1.86 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1.01 MB | 1.01 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | |
routerDirect.js | 1.06 MB | 1.06 MB | |
withRouter.js | 1.06 MB | 1.06 MB | |
Overall change | 5.2 MB | 5.2 MB |
Webpack 5 Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
buildDuration | 14s | 14.2s | |
nodeModulesSize | 69.8 MB | 69.8 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.203 | 2.229 | |
/ avg req/sec | 1134.79 | 1121.5 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.557 | 1.586 | |
/error-in-render avg req/sec | 1605.94 | 1576.09 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
597-913d7a8f..1f0e.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 6.58 kB | 6.58 kB | ✓ |
webpack-HASH.js gzip | 954 B | 954 B | ✓ |
Overall change | 59.9 kB | 59.9 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_app-6e0a903..b885.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-9e190..f9d6.js gzip | 3.38 kB | 3.38 kB | ✓ |
amp-7fd79cc4..99ee.js gzip | 538 B | 538 B | ✓ |
hooks-f7e199..11b9.js gzip | 904 B | 904 B | ✓ |
index-3dc22c..ffbb.js gzip | 232 B | 232 B | ✓ |
link-b960f55..1c2e.js gzip | 1.63 kB | 1.66 kB | |
routerDirect..323a.js gzip | 308 B | 308 B | ✓ |
withRouter-a..2ef8.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.56 kB | 8.59 kB |
Client Build Manifests
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 322 B | ✓ |
Overall change | 322 B | 322 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | vercel/next.js issue-20048-cancel-idle-callback | Change | |
---|---|---|---|
index.html gzip | 586 B | 584 B | -2 B |
link.html gzip | 593 B | 593 B | ✓ |
withRouter.html gzip | 580 B | 579 B | -1 B |
Overall change | 1.76 kB | 1.76 kB | -3 B |
Diffs
Diff for _buildManifest.js
@@ -8,7 +8,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-5023ef2ff38488073670.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-020eb2794ab7d2ded87f.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-177412b8418bdebf043e.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-73e91dc4f2667a6a1a66.js"
],
Diff for link-020eb27..7d2ded87f.js
@@ -42,15 +42,15 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
c = t("elyg"),
u = t("nOHt"),
i = t("vNVm"),
- f = {};
- function l(e, n, t, r) {
+ l = {};
+ function f(e, n, t, r) {
if (e && (0, c.isLocalURL)(n)) {
e.prefetch(n, t, r).catch(function(e) {
0;
});
var o =
r && "undefined" !== typeof r.locale ? r.locale : e && e.locale;
- f[n + "%" + t + (o ? "%" + o : "")] = !0;
+ l[n + "%" + t + (o ? "%" + o : "")] = !0;
}
}
var s = function(e) {
@@ -75,11 +75,11 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
v = e.children,
h = e.replace,
y = e.shallow,
- g = e.scroll,
- _ = e.locale;
+ b = e.scroll,
+ g = e.locale;
"string" === typeof v && (v = a.default.createElement("a", null, v));
- var b = a.Children.only(v),
- m = b && "object" === typeof b && b.ref,
+ var _ = a.Children.only(v),
+ m = _ && "object" === typeof _ && _.ref,
w = (0, i.useIntersection)({ rootMargin: "200px" }),
E = r(w, 2),
L = E[0],
@@ -97,18 +97,18 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
(0, a.useEffect)(
function() {
var e = M && n && (0, c.isLocalURL)(p),
- r = "undefined" !== typeof _ ? _ : t && t.locale,
- o = f[p + "%" + d + (r ? "%" + r : "")];
- e && !o && l(t, p, d, { locale: r });
+ r = "undefined" !== typeof g ? g : t && t.locale,
+ o = l[p + "%" + d + (r ? "%" + r : "")];
+ e && !o && f(t, p, d, { locale: r });
},
- [d, p, M, _, n, t]
+ [d, p, M, g, n, t]
);
var I = {
ref: k,
onClick: function(e) {
- b.props &&
- "function" === typeof b.props.onClick &&
- b.props.onClick(e),
+ _.props &&
+ "function" === typeof _.props.onClick &&
+ _.props.onClick(e),
e.defaultPrevented ||
(function(e, n, t, r, o, a, u, i) {
("A" !== e.currentTarget.nodeName ||
@@ -133,19 +133,19 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
}).then(function(e) {
e && u && document.body.focus();
}));
- })(e, t, p, d, h, y, g, _);
+ })(e, t, p, d, h, y, b, g);
},
onMouseEnter: function(e) {
(0, c.isLocalURL)(p) &&
- (b.props &&
- "function" === typeof b.props.onMouseEnter &&
- b.props.onMouseEnter(e),
- l(t, p, d, { priority: !0 }));
+ (_.props &&
+ "function" === typeof _.props.onMouseEnter &&
+ _.props.onMouseEnter(e),
+ f(t, p, d, { priority: !0 }));
}
};
- if (e.passHref || ("a" === b.type && !("href" in b.props))) {
- var N = "undefined" !== typeof _ ? _ : t && t.locale,
- O =
+ if (e.passHref || ("a" === _.type && !("href" in _.props))) {
+ var N = "undefined" !== typeof g ? g : t && t.locale,
+ C =
t &&
t.isLocaleDomain &&
(0, c.getDomainLocale)(
@@ -155,37 +155,36 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
t && t.domainLocales
);
I.href =
- O ||
+ C ||
(0, c.addBasePath)((0, c.addLocale)(d, N, t && t.defaultLocale));
}
- return a.default.cloneElement(b, I);
+ return a.default.cloneElement(_, I);
};
n.default = s;
},
vNVm: function(e, n, t) {
"use strict";
- var r = t("J4zp"),
- o = t("TqRt");
+ var r = t("J4zp");
(n.__esModule = !0),
(n.useIntersection = function(e) {
var n = e.rootMargin,
- t = e.disabled || !u,
- o = (0, a.useRef)(),
- f = (0, a.useState)(!1),
- l = r(f, 2),
- s = l[0],
- p = l[1],
- d = (0, a.useCallback)(
+ t = e.disabled || !c,
+ i = (0, o.useRef)(),
+ l = (0, o.useState)(!1),
+ f = r(l, 2),
+ s = f[0],
+ p = f[1],
+ d = (0, o.useCallback)(
function(e) {
- o.current && (o.current(), (o.current = void 0)),
+ i.current && (i.current(), (i.current = void 0)),
t ||
s ||
(e &&
e.tagName &&
- (o.current = (function(e, n, t) {
+ (i.current = (function(e, n, t) {
var r = (function(e) {
var n = e.rootMargin || "",
- t = i.get(n);
+ t = u.get(n);
if (t) return t;
var r = new Map(),
o = new IntersectionObserver(function(e) {
@@ -198,7 +197,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
});
}, e);
return (
- i.set(
+ u.set(
n,
(t = { id: n, observer: o, elements: r })
),
@@ -214,7 +213,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
function() {
c.delete(e),
a.unobserve(e),
- 0 === c.size && (a.disconnect(), i.delete(o));
+ 0 === c.size && (a.disconnect(), u.delete(o));
}
);
})(
@@ -228,23 +227,26 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
[t, n, s]
);
return (
- (0, a.useEffect)(
+ (0, o.useEffect)(
function() {
- u ||
- s ||
- (0, c.default)(function() {
+ if (!c && !s) {
+ var e = (0, a.requestIdleCallback)(function() {
return p(!0);
});
+ return function() {
+ return (0, a.cancelIdleCallback)(e);
+ };
+ }
},
[s]
),
[d, s]
);
});
- var a = t("q1tI"),
- c = o(t("0G5g")),
- u = "undefined" !== typeof IntersectionObserver;
- var i = new Map();
+ var o = t("q1tI"),
+ a = t("0G5g"),
+ c = "undefined" !== typeof IntersectionObserver;
+ var u = new Map();
}
},
[["V8Sf", 0, 1, 2]]
Diff for 677f882d2ed8..df2824c01.js
@@ -30,7 +30,8 @@
},
"0G5g": function(t, e, r) {
"use strict";
- (e.__esModule = !0), (e.default = void 0);
+ (e.__esModule = !0),
+ (e.cancelIdleCallback = e.requestIdleCallback = void 0);
var n =
("undefined" !== typeof self && self.requestIdleCallback) ||
function(t) {
@@ -44,7 +45,13 @@
});
}, 1);
};
- e.default = n;
+ e.requestIdleCallback = n;
+ var o =
+ ("undefined" !== typeof self && self.cancelIdleCallback) ||
+ function(t) {
+ return clearTimeout(t);
+ };
+ e.cancelIdleCallback = o;
},
"284h": function(t, e, r) {
var n = r("cDf5");
@@ -265,7 +272,7 @@
(e.getClientBuildManifest = p),
(e.default = void 0);
i(r("Lab5"));
- var u = i(r("0G5g"));
+ var u = r("0G5g");
function c(t, e, r) {
var n,
o = e.get(t);
@@ -299,7 +306,7 @@
}
function h(t, e) {
return new Promise(function(r, n) {
- return (0, u.default)(function() {
+ return (0, u.requestIdleCallback)(function() {
return setTimeout(function() {
return n(e);
}, t);
@@ -520,7 +527,7 @@
);
})
.then(function() {
- (0, u.default)(function() {
+ (0, u.requestIdleCallback)(function() {
return n.loadRoute(e);
});
})
@@ -714,9 +721,9 @@
}),
(e.addLocale = b),
(e.delLocale = _),
- (e.hasBasePath = P),
- (e.addBasePath = S),
- (e.delBasePath = k),
+ (e.hasBasePath = k),
+ (e.addBasePath = P),
+ (e.delBasePath = S),
(e.isLocalURL = E),
(e.interpolateAs = R),
(e.resolveHref = O),
@@ -748,10 +755,10 @@
r = t.indexOf("#");
return (e > -1 || r > -1) && (t = t.substring(0, e > -1 ? e : r)), t;
}
- function P(t) {
+ function k(t) {
return "" === (t = x(t)) || t.startsWith("/");
}
- function S(t) {
+ function P(t) {
return (function(t, e) {
return e && t.startsWith("/")
? "/" === t
@@ -760,7 +767,7 @@
: t;
})(t, "");
}
- function k(t) {
+ function S(t) {
return (
(t = t.slice("".length)).startsWith("/") || (t = "/".concat(t)), t
);
@@ -770,7 +777,7 @@
try {
var e = (0, h.getLocationOrigin)(),
r = new URL(t, e);
- return r.origin === e && P(r.pathname);
+ return r.origin === e && k(r.pathname);
} catch (n) {
return !1;
}
@@ -849,7 +856,7 @@
var e = (0, h.getLocationOrigin)();
return t.startsWith(e) ? t.substring(e.length) : t;
}
- function j(t, e, r) {
+ function I(t, e, r) {
var n = O(t.pathname, e, !0),
o = u(n, 2),
a = o[0],
@@ -858,18 +865,18 @@
s = a.startsWith(c),
l = i && i.startsWith(c);
(a = C(a)), (i = i ? C(i) : i);
- var f = s ? a : S(a),
+ var f = s ? a : P(a),
p = r ? C(O(t.pathname, r)) : i || a;
- return { url: f, as: l ? p : S(p) };
+ return { url: f, as: l ? p : P(p) };
}
- var T = Symbol("SSG_DATA_NOT_FOUND");
- function I(t, e) {
+ var j = Symbol("SSG_DATA_NOT_FOUND");
+ function T(t, e) {
return fetch(t, { credentials: "same-origin" }).then(function(r) {
if (!r.ok) {
- if (e > 1 && r.status >= 500) return I(t, e - 1);
+ if (e > 1 && r.status >= 500) return T(t, e - 1);
if (404 === r.status)
return r.json().then(function(t) {
- if (t.notFound) return { notFound: T };
+ if (t.notFound) return { notFound: j };
throw new Error("Failed to load static props");
});
throw new Error("Failed to load static props");
@@ -878,7 +885,7 @@
});
}
function A(t, e) {
- return I(t, e ? 3 : 1).catch(function(t) {
+ return T(t, e ? 3 : 1).catch(function(t) {
throw (e || (0, s.markAssetError)(t), t);
});
}
@@ -948,7 +955,7 @@
s = i.query;
i.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(c), query: s }),
+ (0, h.formatWithValidation)({ pathname: P(c), query: s }),
(0, h.getURL)()
);
}
@@ -986,7 +993,7 @@
"//" !== n.substr(0, 2) &&
this.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(e), query: r }),
+ (0, h.formatWithValidation)({ pathname: P(e), query: r }),
(0, h.getURL)(),
{ locale: w }
),
@@ -1013,7 +1020,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {};
- var n = j(this, t, e);
+ var n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("pushState", t, e, r)
);
@@ -1026,7 +1033,7 @@
arguments.length > 2 && void 0 !== arguments[2]
? arguments[2]
: {},
- n = j(this, t, e);
+ n = I(this, t, e);
return (
(t = n.url), (e = n.as), this.change("replaceState", t, e, r)
);
@@ -1045,15 +1052,15 @@
x,
O,
C,
- I,
+ T,
A,
D,
M,
N,
U,
W,
- F,
q,
+ F,
G,
B,
H,
@@ -1100,14 +1107,14 @@
this._inFlightRoute,
g
),
- (a = S(
+ (a = P(
b(
- P(a) ? k(a) : a,
+ k(a) ? S(a) : a,
i.locale,
this.defaultLocale
)
)),
- (w = _(P(a) ? k(a) : a, this.locale)),
+ (w = _(k(a) ? S(a) : a, this.locale)),
(this._inFlightRoute = a),
i._h || !this.onlyAHashChange(w))
) {
@@ -1127,7 +1134,7 @@
return (
(x = (0, d.parseRelativeUrl)(o)),
(C = (O = x).pathname),
- (I = O.query),
+ (T = O.query),
(e.prev = 36),
(e.next = 39),
this.pageLoader.getPageList()
@@ -1154,7 +1161,7 @@
((C = x.pathname),
(o = (0, h.formatWithValidation)(x))),
(C = C
- ? (0, c.removePathTrailingSlash)(k(C))
+ ? (0, c.removePathTrailingSlash)(S(C))
: C),
this.urlIsNew(w) || f || (r = "replaceState"),
(M = (0, c.removePathTrailingSlash)(C)),
@@ -1173,7 +1180,7 @@
);
case 62:
if (
- ((N = _(k(N), this.locale)),
+ ((N = _(S(N), this.locale)),
!(0, p.isDynamicRoute)(M))
) {
e.next = 78;
@@ -1182,20 +1189,20 @@
if (
((U = (0, d.parseRelativeUrl)(N)),
(W = U.pathname),
- (F = (0, m.getRouteRegex)(M)),
- (q = (0, y.getRouteMatcher)(F)(W)),
- (B = (G = M === W) ? R(M, W, I) : {}),
- q && (!G || B.result))
+ (q = (0, m.getRouteRegex)(M)),
+ (F = (0, y.getRouteMatcher)(q)(W)),
+ (B = (G = M === W) ? R(M, W, T) : {}),
+ F && (!G || B.result))
) {
e.next = 77;
break;
}
if (
!(
- (H = Object.keys(F.groups).filter(function(
+ (H = Object.keys(q.groups).filter(function(
t
) {
- return !I[t];
+ return !T[t];
})).length > 0
)
) {
@@ -1233,16 +1240,16 @@
? (a = (0, h.formatWithValidation)(
Object.assign({}, U, {
pathname: B.result,
- query: L(I, B.params)
+ query: L(T, B.params)
})
))
- : Object.assign(I, q);
+ : Object.assign(T, F);
case 78:
return (
t.events.emit("routeChangeStart", a, g),
(e.prev = 79),
(e.next = 82),
- this.getRouteInfo(M, C, I, a, N, g)
+ this.getRouteInfo(M, C, T, a, N, g)
);
case 82:
if (
@@ -1275,7 +1282,7 @@
break;
}
return (
- (K = j(this, Q, Q)),
+ (K = I(this, Q, Q)),
(tt = K.url),
(et = K.as),
e.abrupt("return", this.change(r, tt, et, i))
@@ -1286,7 +1293,7 @@
e.abrupt("return", new Promise(function() {}))
);
case 95:
- if (J.notFound !== T) {
+ if (J.notFound !== j) {
e.next = 108;
break;
}
@@ -1305,7 +1312,7 @@
case 105:
return (
(e.next = 107),
- this.getRouteInfo(rt, rt, I, a, N, {
+ this.getRouteInfo(rt, rt, T, a, N, {
shallow: !1
})
);
@@ -1320,7 +1327,7 @@
this.set(
M,
C,
- I,
+ T,
w,
V,
u || (nt || !i.scroll ? null : { x: 0, y: 0 })
@@ -1680,7 +1687,7 @@
arguments[2],
n = t.pathname,
o = (0, c.removePathTrailingSlash)(
- (0, l.denormalizePagePath)(r ? k(n) : n)
+ (0, l.denormalizePagePath)(r ? S(n) : n)
);
return (
"/404" === o ||
@@ -1691,7 +1698,7 @@
(0, p.isDynamicRoute)(e) &&
(0, m.getRouteRegex)(e).re.test(o)
)
- return (t.pathname = r ? S(e) : e), !0;
+ return (t.pathname = r ? P(e) : e), !0;
}),
(t.pathname = (0, c.removePathTrailingSlash)(t.pathname))),
t
@@ -2112,7 +2119,7 @@
}
try {
c({}, "");
- } catch (j) {
+ } catch (I) {
c = function(t, e, r) {
return (t[e] = r);
};
@@ -2133,7 +2140,7 @@
for (r.method = o, r.arg = a; ; ) {
var i = r.delegate;
if (i) {
- var u = k(i, r);
+ var u = S(i, r);
if (u) {
if (u === v) continue;
return u;
@@ -2161,8 +2168,8 @@
function l(t, e, r) {
try {
return { type: "normal", arg: t.call(e, r) };
- } catch (j) {
- return { type: "throw", arg: j };
+ } catch (I) {
+ return { type: "throw", arg: I };
}
}
t.wrap = s;
@@ -2182,14 +2189,14 @@
_ = b && b(b(O([])));
_ && _ !== r && n.call(_, a) && (w = _);
var x = (g.prototype = y.prototype = Object.create(w));
- function P(t) {
+ function k(t) {
["next", "throw", "return"].forEach(function(e) {
c(t, e, function(t) {
return this._invoke(e, t);
});
});
}
- function S(t, e) {
+ function P(t, e) {
function r(o, a, i, u) {
var c = l(t[o], t, a);
if ("throw" !== c.type) {
@@ -2225,7 +2232,7 @@
return (o = o ? o.then(a, a) : a());
};
}
- function k(t, r) {
+ function S(t, r) {
var n = t.iterator[r.method];
if (n === e) {
if (((r.delegate = null), "throw" === r.method)) {
@@ -2233,7 +2240,7 @@
t.iterator.return &&
((r.method = "return"),
(r.arg = e),
- k(t, r),
+ S(t, r),
"throw" === r.method)
)
return v;
@@ -2321,21 +2328,21 @@
(t.awrap = function(t) {
return { __await: t };
}),
- P(S.prototype),
- (S.prototype[i] = function() {
+ k(P.prototype),
+ (P.prototype[i] = function() {
return this;
}),
- (t.AsyncIterator = S),
+ (t.AsyncIterator = P),
(t.async = function(e, r, n, o, a) {
void 0 === a && (a = Promise);
- var i = new S(s(e, r, n, o), a);
+ var i = new P(s(e, r, n, o), a);
return t.isGeneratorFunction(r)
? i
: i.next().then(function(t) {
return t.done ? t.value : i.next();
});
}),
- P(x),
+ k(x),
c(x, u, "Generator"),
(x[a] = function() {
return this;
Diff for index.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "tUfJV5JrY9T0R29TuSfqF",
+ "buildId": "DnHD584HNXAPcHPW9ykPq",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/tUfJV5JrY9T0R29TuSfqF/_buildManifest.js"
+ src="/_next/static/DnHD584HNXAPcHPW9ykPq/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/tUfJV5JrY9T0R29TuSfqF/_ssgManifest.js"
+ src="/_next/static/DnHD584HNXAPcHPW9ykPq/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -32,7 +32,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ href="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
as="script"
/>
</head>
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "tUfJV5JrY9T0R29TuSfqF",
+ "buildId": "DnHD584HNXAPcHPW9ykPq",
"isFallback": false,
"gip": true
}
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -78,15 +78,15 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-020eb2794ab7d2ded87f.js"
+ src="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
async=""
></script>
<script
- src="/_next/static/tUfJV5JrY9T0R29TuSfqF/_buildManifest.js"
+ src="/_next/static/DnHD584HNXAPcHPW9ykPq/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/tUfJV5JrY9T0R29TuSfqF/_ssgManifest.js"
+ src="/_next/static/DnHD584HNXAPcHPW9ykPq/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
as="script"
/>
<link
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "tUfJV5JrY9T0R29TuSfqF",
+ "buildId": "DnHD584HNXAPcHPW9ykPq",
"isFallback": false,
"gip": true
}
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3b6332a757fdf2824c01.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4826dee40eb7293b5cb0.js"
async=""
></script>
<script
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/tUfJV5JrY9T0R29TuSfqF/_buildManifest.js"
+ src="/_next/static/DnHD584HNXAPcHPW9ykPq/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/tUfJV5JrY9T0R29TuSfqF/_ssgManifest.js"
+ src="/_next/static/DnHD584HNXAPcHPW9ykPq/_ssgManifest.js"
async=""
></script>
</body>
This lands #20169 with a test, as I can't update that PR for some reason.
Fixes #20048
Closes #20169