-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Speculate Navigations for Client-Side JS #10560
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
buildDuration | 11.2s | 11.2s | -46ms |
nodeModulesSize | 52.7 MB | 52.7 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.js gzip | 5.14 kB | 5.14 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..4e43.js gzip | 16.2 kB | 16.3 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 70 kB | 70 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.14 kB | 4.14 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.7 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.js gzip | 1.15 kB | 1.15 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.89 kB | 2.96 kB | |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.74 kB |
Client Pages Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.module.js gzip | 576 B | 576 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.46 kB | 2.5 kB | |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.26 kB |
Client Build Manifests
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.03 kB | -2 B |
link.html gzip | 1.04 kB | 1.04 kB | -2 B |
withRouter.html gzip | 1.03 kB | 1.03 kB | -1 B |
Overall change | 3.11 kB | 3.1 kB | -5 B |
Diffs
Diff for index.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for de003c3a9d30..57.module.js
@@ -3288,13 +3288,16 @@ class Router {
return this.asPath !== asPath;
}
/**
- * Prefetch `page` code, you may wait for the data during `page` rendering.
+ * Prefetch page code, you may wait for the data during page rendering.
* This feature only works in production!
- * @param url of prefetched `page`
+ * @param url the href of prefetched page
+ * @param asPath the as path of the prefetched page
*/
prefetch(url) {
+ var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return new _Promise((resolve, reject) => {
var {
pathname,
@@ -3310,8 +3313,7 @@ class Router {
if (false) {}
- var route = toRoute(pathname);
- this.pageLoader.prefetch(route).then(resolve, reject);
+ this.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname)).then(() => resolve(), reject);
});
}
Diff for de003c3a9d30..291efaf38.js
@@ -3043,9 +3043,10 @@ function () {
return this.asPath !== asPath;
}
/**
- * Prefetch `page` code, you may wait for the data during `page` rendering.
+ * Prefetch page code, you may wait for the data during page rendering.
* This feature only works in production!
- * @param url of prefetched `page`
+ * @param url the href of prefetched page
+ * @param asPath the as path of the prefetched page
*/
}, {
@@ -3053,6 +3054,8 @@ function () {
value: function prefetch(url) {
var _this4 = this;
+ var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return new _Promise(function (resolve, reject) {
var _url_1$parse4 = url_1.parse(url),
pathname = _url_1$parse4.pathname,
@@ -3067,9 +3070,9 @@ function () {
if (false) {}
- var route = toRoute(pathname);
-
- _this4.pageLoader.prefetch(route).then(resolve, reject);
+ _this4.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname)).then(function () {
+ return resolve();
+ }, reject);
});
}
}, {
Diff for link.module.js
@@ -285,14 +285,14 @@ var _interopRequireWildcard = __webpack_require__("5Uuq");
exports.__esModule = true;
exports.default = void 0;
-var _url = __webpack_require__("CxY0");
-
var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
-var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+var _url = __webpack_require__("CxY0");
var _utils = __webpack_require__("g/15");
+var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+
function isLocal(href) {
var url = (0, _url.parse)(href, false, true);
var origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
@@ -448,18 +448,20 @@ class Link extends _react.Component {
this.cleanUpListeners();
}
- getHref() {
+ getPaths() {
var {
pathname
} = window.location;
var {
- href: parsedHref
+ href: parsedHref,
+ as: parsedAs
} = this.formatUrls(this.props.href, this.props.as);
- return (0, _url.resolve)(pathname, parsedHref);
+ var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
+ return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
}
handleRef(ref) {
- var isPrefetched = prefetched[this.getHref()];
+ var isPrefetched = prefetched[this.getPaths()[0]];
if (this.p && IntersectionObserver && ref && ref.tagName) {
this.cleanUpListeners();
@@ -474,12 +476,18 @@ class Link extends _react.Component {
// as per https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html
- prefetch() {
+ prefetch(options) {
+ if (options === void 0) {
+ options = {};
+ }
+
if (!this.p || false) return; // Prefetch the JSON page if asked (only in the client)
- var href = this.getHref();
+ var [href, asPath] = this.getPaths();
- _router.default.prefetch(href);
+ _router.default.prefetch(href, asPath, {
+ priority: options.priority
+ });
prefetched[href] = true;
}
@@ -515,7 +523,9 @@ class Link extends _react.Component {
child.props.onMouseEnter(e);
}
- this.prefetch();
+ this.prefetch({
+ priority: true
+ });
},
onClick: e => {
if (child.props && typeof child.props.onClick === 'function') {
Diff for link.js
@@ -388,6 +388,8 @@ module.exports = _possibleConstructorReturn;
"use strict";
+var _slicedToArray = __webpack_require__("8+Nu");
+
var _classCallCheck = __webpack_require__("/HRN");
var _createClass = __webpack_require__("WaGi");
@@ -407,14 +409,14 @@ var _interopRequireWildcard = __webpack_require__("5Uuq");
exports.__esModule = true;
exports["default"] = void 0;
-var _url = __webpack_require__("CxY0");
-
var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
-var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+var _url = __webpack_require__("CxY0");
var _utils = __webpack_require__("g/15");
+var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+
function isLocal(href) {
var url = (0, _url.parse)(href, false, true);
var origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
@@ -575,21 +577,23 @@ function (_react$Component) {
this.cleanUpListeners();
}
}, {
- key: "getHref",
- value: function getHref() {
+ key: "getPaths",
+ value: function getPaths() {
var pathname = window.location.pathname;
var _this$formatUrls2 = this.formatUrls(this.props.href, this.props.as),
- parsedHref = _this$formatUrls2.href;
+ parsedHref = _this$formatUrls2.href,
+ parsedAs = _this$formatUrls2.as;
- return (0, _url.resolve)(pathname, parsedHref);
+ var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
+ return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
}
}, {
key: "handleRef",
value: function handleRef(ref) {
var _this2 = this;
- var isPrefetched = prefetched[this.getHref()];
+ var isPrefetched = prefetched[this.getPaths()[0]];
if (this.p && IntersectionObserver && ref && ref.tagName) {
this.cleanUpListeners();
@@ -605,12 +609,21 @@ function (_react$Component) {
}, {
key: "prefetch",
- value: function prefetch() {
+ value: function prefetch(options) {
+ if (options === void 0) {
+ options = {};
+ }
+
if (!this.p || false) return; // Prefetch the JSON page if asked (only in the client)
- var href = this.getHref();
+ var _this$getPaths = this.getPaths(),
+ _this$getPaths2 = _slicedToArray(_this$getPaths, 2),
+ href = _this$getPaths2[0],
+ asPath = _this$getPaths2[1];
- _router["default"].prefetch(href);
+ _router["default"].prefetch(href, asPath, {
+ priority: options.priority
+ });
prefetched[href] = true;
}
@@ -648,7 +661,9 @@ function (_react$Component) {
child.props.onMouseEnter(e);
}
- _this3.prefetch();
+ _this3.prefetch({
+ priority: true
+ });
},
onClick: function onClick(e) {
if (child.props && typeof child.props.onClick === 'function') {
Diff for link.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for withRouter.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
buildDuration | 11.9s | 12.4s | |
nodeModulesSize | 52.7 MB | 52.7 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.js gzip | 5.14 kB | 5.14 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..4e43.js gzip | 16.2 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..7503.js gzip | N/A | 16.3 kB | N/A |
Overall change | 70 kB | 70 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.14 kB | 4.14 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 15.1 kB | N/A |
Overall change | 64.7 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.js gzip | 1.15 kB | 1.15 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.89 kB | 2.96 kB | |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.74 kB |
Client Pages Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.module.js gzip | 576 B | 576 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.46 kB | 2.5 kB | |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.26 kB |
Client Build Manifests
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_error.js gzip | 290 kB | 289 kB | -635 B |
404.html gzip | 1.45 kB | 1.44 kB | -2 B |
hooks.html gzip | 1.08 kB | 1.08 kB | -1 B |
index.js gzip | 290 kB | 289 kB | -365 B |
link.js gzip | 319 kB | 319 kB | |
routerDirect.js gzip | 317 kB | 316 kB | -550 B |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.53 MB |
Commit: ac46941
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
buildDuration | 13.6s | 13.7s | |
nodeModulesSize | 52.7 MB | 52.7 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.js gzip | 5.14 kB | 5.14 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..4e43.js gzip | 16.2 kB | 16.3 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 70 kB | 70 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.14 kB | 4.14 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.7 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.js gzip | 1.15 kB | 1.15 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.89 kB | 2.96 kB | |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.74 kB |
Client Pages Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.module.js gzip | 576 B | 576 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.46 kB | 2.5 kB | |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.26 kB |
Client Build Manifests
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.03 kB | -2 B |
link.html gzip | 1.04 kB | 1.04 kB | -2 B |
withRouter.html gzip | 1.03 kB | 1.03 kB | -1 B |
Overall change | 3.11 kB | 3.1 kB | -5 B |
Diffs
Diff for index.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for de003c3a9d30..57.module.js
@@ -3288,13 +3288,16 @@ class Router {
return this.asPath !== asPath;
}
/**
- * Prefetch `page` code, you may wait for the data during `page` rendering.
+ * Prefetch page code, you may wait for the data during page rendering.
* This feature only works in production!
- * @param url of prefetched `page`
+ * @param url the href of prefetched page
+ * @param asPath the as path of the prefetched page
*/
prefetch(url) {
+ var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return new _Promise((resolve, reject) => {
var {
pathname,
@@ -3310,8 +3313,7 @@ class Router {
if (false) {}
- var route = toRoute(pathname);
- this.pageLoader.prefetch(route).then(resolve, reject);
+ this.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname)).then(() => resolve(), reject);
});
}
Diff for de003c3a9d30..291efaf38.js
@@ -3043,9 +3043,10 @@ function () {
return this.asPath !== asPath;
}
/**
- * Prefetch `page` code, you may wait for the data during `page` rendering.
+ * Prefetch page code, you may wait for the data during page rendering.
* This feature only works in production!
- * @param url of prefetched `page`
+ * @param url the href of prefetched page
+ * @param asPath the as path of the prefetched page
*/
}, {
@@ -3053,6 +3054,8 @@ function () {
value: function prefetch(url) {
var _this4 = this;
+ var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return new _Promise(function (resolve, reject) {
var _url_1$parse4 = url_1.parse(url),
pathname = _url_1$parse4.pathname,
@@ -3067,9 +3070,9 @@ function () {
if (false) {}
- var route = toRoute(pathname);
-
- _this4.pageLoader.prefetch(route).then(resolve, reject);
+ _this4.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname)).then(function () {
+ return resolve();
+ }, reject);
});
}
}, {
Diff for link.module.js
@@ -285,14 +285,14 @@ var _interopRequireWildcard = __webpack_require__("5Uuq");
exports.__esModule = true;
exports.default = void 0;
-var _url = __webpack_require__("CxY0");
-
var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
-var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+var _url = __webpack_require__("CxY0");
var _utils = __webpack_require__("g/15");
+var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+
function isLocal(href) {
var url = (0, _url.parse)(href, false, true);
var origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
@@ -448,18 +448,20 @@ class Link extends _react.Component {
this.cleanUpListeners();
}
- getHref() {
+ getPaths() {
var {
pathname
} = window.location;
var {
- href: parsedHref
+ href: parsedHref,
+ as: parsedAs
} = this.formatUrls(this.props.href, this.props.as);
- return (0, _url.resolve)(pathname, parsedHref);
+ var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
+ return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
}
handleRef(ref) {
- var isPrefetched = prefetched[this.getHref()];
+ var isPrefetched = prefetched[this.getPaths()[0]];
if (this.p && IntersectionObserver && ref && ref.tagName) {
this.cleanUpListeners();
@@ -474,12 +476,18 @@ class Link extends _react.Component {
// as per https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html
- prefetch() {
+ prefetch(options) {
+ if (options === void 0) {
+ options = {};
+ }
+
if (!this.p || false) return; // Prefetch the JSON page if asked (only in the client)
- var href = this.getHref();
+ var [href, asPath] = this.getPaths();
- _router.default.prefetch(href);
+ _router.default.prefetch(href, asPath, {
+ priority: options.priority
+ });
prefetched[href] = true;
}
@@ -515,7 +523,9 @@ class Link extends _react.Component {
child.props.onMouseEnter(e);
}
- this.prefetch();
+ this.prefetch({
+ priority: true
+ });
},
onClick: e => {
if (child.props && typeof child.props.onClick === 'function') {
Diff for link.js
@@ -388,6 +388,8 @@ module.exports = _possibleConstructorReturn;
"use strict";
+var _slicedToArray = __webpack_require__("8+Nu");
+
var _classCallCheck = __webpack_require__("/HRN");
var _createClass = __webpack_require__("WaGi");
@@ -407,14 +409,14 @@ var _interopRequireWildcard = __webpack_require__("5Uuq");
exports.__esModule = true;
exports["default"] = void 0;
-var _url = __webpack_require__("CxY0");
-
var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
-var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+var _url = __webpack_require__("CxY0");
var _utils = __webpack_require__("g/15");
+var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+
function isLocal(href) {
var url = (0, _url.parse)(href, false, true);
var origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
@@ -575,21 +577,23 @@ function (_react$Component) {
this.cleanUpListeners();
}
}, {
- key: "getHref",
- value: function getHref() {
+ key: "getPaths",
+ value: function getPaths() {
var pathname = window.location.pathname;
var _this$formatUrls2 = this.formatUrls(this.props.href, this.props.as),
- parsedHref = _this$formatUrls2.href;
+ parsedHref = _this$formatUrls2.href,
+ parsedAs = _this$formatUrls2.as;
- return (0, _url.resolve)(pathname, parsedHref);
+ var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
+ return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
}
}, {
key: "handleRef",
value: function handleRef(ref) {
var _this2 = this;
- var isPrefetched = prefetched[this.getHref()];
+ var isPrefetched = prefetched[this.getPaths()[0]];
if (this.p && IntersectionObserver && ref && ref.tagName) {
this.cleanUpListeners();
@@ -605,12 +609,21 @@ function (_react$Component) {
}, {
key: "prefetch",
- value: function prefetch() {
+ value: function prefetch(options) {
+ if (options === void 0) {
+ options = {};
+ }
+
if (!this.p || false) return; // Prefetch the JSON page if asked (only in the client)
- var href = this.getHref();
+ var _this$getPaths = this.getPaths(),
+ _this$getPaths2 = _slicedToArray(_this$getPaths, 2),
+ href = _this$getPaths2[0],
+ asPath = _this$getPaths2[1];
- _router["default"].prefetch(href);
+ _router["default"].prefetch(href, asPath, {
+ priority: options.priority
+ });
prefetched[href] = true;
}
@@ -648,7 +661,9 @@ function (_react$Component) {
child.props.onMouseEnter(e);
}
- _this3.prefetch();
+ _this3.prefetch({
+ priority: true
+ });
},
onClick: function onClick(e) {
if (child.props && typeof child.props.onClick === 'function') {
Diff for link.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for withRouter.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
buildDuration | 14.4s | 14.4s | -46ms |
nodeModulesSize | 52.7 MB | 52.7 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.js gzip | 5.14 kB | 5.14 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..4e43.js gzip | 16.2 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..7503.js gzip | N/A | 16.3 kB | N/A |
Overall change | 70 kB | 70 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.14 kB | 4.14 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 15.1 kB | N/A |
Overall change | 64.7 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.js gzip | 1.15 kB | 1.15 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.89 kB | 2.96 kB | |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.74 kB |
Client Pages Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.module.js gzip | 576 B | 576 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.46 kB | 2.5 kB | |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.26 kB |
Client Build Manifests
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_error.js gzip | 289 kB | 289 kB | -20 B |
404.html gzip | 1.45 kB | 1.44 kB | -2 B |
hooks.html gzip | 1.08 kB | 1.08 kB | -1 B |
index.js gzip | 290 kB | 290 kB | |
link.js gzip | 319 kB | 319 kB | |
routerDirect.js gzip | 316 kB | 316 kB | |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.53 MB |
Commit: 779bf29
ijjk
reviewed
Feb 17, 2020
ijjk
reviewed
Feb 17, 2020
ijjk
approved these changes
Feb 17, 2020
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
buildDuration | 12.1s | 12.5s | |
nodeModulesSize | 52.7 MB | 52.7 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.js gzip | 5.14 kB | 5.14 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..4e43.js gzip | 16.2 kB | 16.3 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 70 kB | 70 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.14 kB | 4.14 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.7 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.js gzip | 1.15 kB | 1.15 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.89 kB | 2.95 kB | |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.73 kB |
Client Pages Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.module.js gzip | 576 B | 576 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.46 kB | 2.49 kB | |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.25 kB |
Client Build Manifests
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.03 kB | -2 B |
link.html gzip | 1.04 kB | 1.04 kB | -2 B |
withRouter.html gzip | 1.03 kB | 1.03 kB | -1 B |
Overall change | 3.11 kB | 3.1 kB | -5 B |
Diffs
Diff for link.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for index.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for de003c3a9d30..57.module.js
@@ -3288,13 +3288,16 @@ class Router {
return this.asPath !== asPath;
}
/**
- * Prefetch `page` code, you may wait for the data during `page` rendering.
+ * Prefetch page code, you may wait for the data during page rendering.
* This feature only works in production!
- * @param url of prefetched `page`
+ * @param url the href of prefetched page
+ * @param asPath the as path of the prefetched page
*/
prefetch(url) {
+ var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return new _Promise((resolve, reject) => {
var {
pathname,
@@ -3310,8 +3313,7 @@ class Router {
if (false) {}
- var route = toRoute(pathname);
- this.pageLoader.prefetch(route).then(resolve, reject);
+ this.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname)).then(() => resolve(), reject);
});
}
Diff for de003c3a9d30..291efaf38.js
@@ -3043,9 +3043,10 @@ function () {
return this.asPath !== asPath;
}
/**
- * Prefetch `page` code, you may wait for the data during `page` rendering.
+ * Prefetch page code, you may wait for the data during page rendering.
* This feature only works in production!
- * @param url of prefetched `page`
+ * @param url the href of prefetched page
+ * @param asPath the as path of the prefetched page
*/
}, {
@@ -3053,6 +3054,8 @@ function () {
value: function prefetch(url) {
var _this4 = this;
+ var asPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : url;
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return new _Promise(function (resolve, reject) {
var _url_1$parse4 = url_1.parse(url),
pathname = _url_1$parse4.pathname,
@@ -3067,9 +3070,9 @@ function () {
if (false) {}
- var route = toRoute(pathname);
-
- _this4.pageLoader.prefetch(route).then(resolve, reject);
+ _this4.pageLoader[options.priority ? 'loadPage' : 'prefetch'](toRoute(pathname)).then(function () {
+ return resolve();
+ }, reject);
});
}
}, {
Diff for link.module.js
@@ -285,14 +285,14 @@ var _interopRequireWildcard = __webpack_require__("5Uuq");
exports.__esModule = true;
exports.default = void 0;
-var _url = __webpack_require__("CxY0");
-
var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
-var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+var _url = __webpack_require__("CxY0");
var _utils = __webpack_require__("g/15");
+var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+
function isLocal(href) {
var url = (0, _url.parse)(href, false, true);
var origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
@@ -448,18 +448,20 @@ class Link extends _react.Component {
this.cleanUpListeners();
}
- getHref() {
+ getPaths() {
var {
pathname
} = window.location;
var {
- href: parsedHref
+ href: parsedHref,
+ as: parsedAs
} = this.formatUrls(this.props.href, this.props.as);
- return (0, _url.resolve)(pathname, parsedHref);
+ var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
+ return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
}
handleRef(ref) {
- var isPrefetched = prefetched[this.getHref()];
+ var isPrefetched = prefetched[this.getPaths()[0]];
if (this.p && IntersectionObserver && ref && ref.tagName) {
this.cleanUpListeners();
@@ -474,12 +476,12 @@ class Link extends _react.Component {
// as per https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html
- prefetch() {
+ prefetch(options) {
if (!this.p || false) return; // Prefetch the JSON page if asked (only in the client)
- var href = this.getHref();
+ var [href, asPath] = this.getPaths();
- _router.default.prefetch(href);
+ _router.default.prefetch(href, asPath, options);
prefetched[href] = true;
}
@@ -515,7 +517,9 @@ class Link extends _react.Component {
child.props.onMouseEnter(e);
}
- this.prefetch();
+ this.prefetch({
+ priority: true
+ });
},
onClick: e => {
if (child.props && typeof child.props.onClick === 'function') {
Diff for link.js
@@ -388,6 +388,8 @@ module.exports = _possibleConstructorReturn;
"use strict";
+var _slicedToArray = __webpack_require__("8+Nu");
+
var _classCallCheck = __webpack_require__("/HRN");
var _createClass = __webpack_require__("WaGi");
@@ -407,14 +409,14 @@ var _interopRequireWildcard = __webpack_require__("5Uuq");
exports.__esModule = true;
exports["default"] = void 0;
-var _url = __webpack_require__("CxY0");
-
var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
-var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+var _url = __webpack_require__("CxY0");
var _utils = __webpack_require__("g/15");
+var _router = _interopRequireDefault(__webpack_require__("nOHt"));
+
function isLocal(href) {
var url = (0, _url.parse)(href, false, true);
var origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
@@ -575,21 +577,23 @@ function (_react$Component) {
this.cleanUpListeners();
}
}, {
- key: "getHref",
- value: function getHref() {
+ key: "getPaths",
+ value: function getPaths() {
var pathname = window.location.pathname;
var _this$formatUrls2 = this.formatUrls(this.props.href, this.props.as),
- parsedHref = _this$formatUrls2.href;
+ parsedHref = _this$formatUrls2.href,
+ parsedAs = _this$formatUrls2.as;
- return (0, _url.resolve)(pathname, parsedHref);
+ var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
+ return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
}
}, {
key: "handleRef",
value: function handleRef(ref) {
var _this2 = this;
- var isPrefetched = prefetched[this.getHref()];
+ var isPrefetched = prefetched[this.getPaths()[0]];
if (this.p && IntersectionObserver && ref && ref.tagName) {
this.cleanUpListeners();
@@ -605,12 +609,15 @@ function (_react$Component) {
}, {
key: "prefetch",
- value: function prefetch() {
+ value: function prefetch(options) {
if (!this.p || false) return; // Prefetch the JSON page if asked (only in the client)
- var href = this.getHref();
+ var _this$getPaths = this.getPaths(),
+ _this$getPaths2 = _slicedToArray(_this$getPaths, 2),
+ href = _this$getPaths2[0],
+ asPath = _this$getPaths2[1];
- _router["default"].prefetch(href);
+ _router["default"].prefetch(href, asPath, options);
prefetched[href] = true;
}
@@ -648,7 +655,9 @@ function (_react$Component) {
child.props.onMouseEnter(e);
}
- _this3.prefetch();
+ _this3.prefetch({
+ priority: true
+ });
},
onClick: function onClick(e) {
if (child.props && typeof child.props.onClick === 'function') {
Diff for withRouter.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.74ddaa6612e291efaf38.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.be5d876e90bac8b6b657.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-355bc4b3077ea9d3fc7a.js"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.c07ba8a3b0945b0f6315.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/commons.5d483f979b96e9afed5a.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.9a0caf742c992a927903.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/4952ddcd88e7185e66c9cf40e2d848b7e27f1574.6406830adfd759a39616.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.50b69fd44d851a2455da.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.125fbebff8ed33508f8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-88859e083a3b7e2866f5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-9e977168bc55d5cb0d4e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
buildDuration | 13s | 13.3s | |
nodeModulesSize | 52.7 MB | 52.7 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.js gzip | 5.14 kB | 5.14 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..4e43.js gzip | 16.2 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..7503.js gzip | N/A | 16.3 kB | N/A |
Overall change | 70 kB | 70 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.14 kB | 4.14 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 15.1 kB | N/A |
Overall change | 64.7 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.js gzip | 1.15 kB | 1.15 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.89 kB | 2.95 kB | |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.73 kB |
Client Pages Modern Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_app.module.js gzip | 576 B | 576 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.46 kB | 2.49 kB | |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.25 kB |
Client Build Manifests
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles Overall increase ⚠️
zeit/next.js canary | Timer/next.js speculative-execution | Change | |
---|---|---|---|
_error.js gzip | 289 kB | 290 kB | |
404.html gzip | 1.45 kB | 1.44 kB | -2 B |
hooks.html gzip | 1.08 kB | 1.08 kB | -1 B |
index.js gzip | 290 kB | 289 kB | -744 B |
link.js gzip | 319 kB | 319 kB | |
routerDirect.js gzip | 315 kB | 316 kB | |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.53 MB |
Commit: 3cb654f
This was referenced Mar 13, 2020
This was referenced Mar 22, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our router has a
prefetch
method that accepts anhref
argument. However, other route-related methods accept ahref
andas
argument.This pull request unifies the router interface by allowing the user to pass
href
andas
, like they would to other methods.It also adds optional options to the end, allowing users to specify if the fetch is
priority
or not.On mouse enter, we trigger a higher-priority loading of the page by injecting its
<script>
tags. This makes the files immediately jump to the front of the Network queue, and starts the script parsing early (prior to navigation).