-
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
Add useFallback
Hook
#10527
Closed
Closed
Add useFallback
Hook
#10527
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
Timer
commented
Feb 14, 2020
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
buildDuration | 11.3s | 11.9s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.04 kB | |
link.html gzip | 1.04 kB | 1.04 kB | ✓ |
withRouter.html gzip | 1.03 kB | 1.03 kB | |
Overall change | 3.11 kB | 3.11 kB |
Diffs
Diff for main-HASH.module.js
@@ -17,6 +17,40 @@ window.next = next;
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -191,30 +225,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -276,6 +313,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
class Container extends _react.default.Component {
componentDidCatch(err, info) {
@@ -399,6 +437,7 @@ var _default = async function _default(_temp) {
props,
err
} = _ref3;
+ isServerRoute = false;
render({
App,
Component,
@@ -575,9 +614,14 @@ function AppContainer(_ref4) {
}).catch(err => console.error('Error rendering page: ', err))
}, _react.default.createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react.default.createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react.default.createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = App => props => {
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 main-HASH.js
@@ -67,6 +67,40 @@ module.exports = __webpack_require__("+plK");
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -272,30 +306,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -358,6 +395,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
var Container =
/*#__PURE__*/
@@ -530,6 +568,7 @@ var _default = function _default(_temp) {
var Component = _ref3.Component,
props = _ref3.props,
err = _ref3.err;
+ isServerRoute = false;
render({
App: App,
Component: Component,
@@ -793,9 +832,14 @@ function AppContainer(_ref4) {
}
}, _react["default"].createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react["default"].createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react["default"].createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = function wrapApp(App) {
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 add/use-fallback | Change | |
---|---|---|---|
buildDuration | 12.1s | 12.3s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 add/use-fallback | Change | |
---|---|---|---|
_error.js gzip | 289 kB | 290 kB | |
404.html gzip | 1.44 kB | 1.45 kB | |
hooks.html gzip | 1.08 kB | 1.08 kB | |
index.js gzip | 289 kB | 290 kB | |
link.js gzip | 319 kB | 320 kB | |
routerDirect.js gzip | 317 kB | 316 kB | -301 B |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.54 MB |
Commit: 1736995
ijjk
approved these changes
Feb 14, 2020
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
buildDuration | 12.1s | 12.6s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.04 kB | |
link.html gzip | 1.04 kB | 1.04 kB | ✓ |
withRouter.html gzip | 1.03 kB | 1.03 kB | |
Overall change | 3.11 kB | 3.11 kB |
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 main-HASH.module.js
@@ -17,6 +17,40 @@ window.next = next;
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -191,30 +225,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -276,6 +313,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
class Container extends _react.default.Component {
componentDidCatch(err, info) {
@@ -399,6 +437,7 @@ var _default = async function _default(_temp) {
props,
err
} = _ref3;
+ isServerRoute = false;
render({
App,
Component,
@@ -575,9 +614,14 @@ function AppContainer(_ref4) {
}).catch(err => console.error('Error rendering page: ', err))
}, _react.default.createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react.default.createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react.default.createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = App => props => {
Diff for main-HASH.js
@@ -67,6 +67,40 @@ module.exports = __webpack_require__("+plK");
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -272,30 +306,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -358,6 +395,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
var Container =
/*#__PURE__*/
@@ -530,6 +568,7 @@ var _default = function _default(_temp) {
var Component = _ref3.Component,
props = _ref3.props,
err = _ref3.err;
+ isServerRoute = false;
render({
App: App,
Component: Component,
@@ -793,9 +832,14 @@ function AppContainer(_ref4) {
}
}, _react["default"].createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react["default"].createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react["default"].createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = function wrapApp(App) {
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 add/use-fallback | Change | |
---|---|---|---|
buildDuration | 14.1s | 13.3s | -823ms |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 add/use-fallback | Change | |
---|---|---|---|
_error.js gzip | 290 kB | 290 kB | -384 B |
404.html gzip | 1.44 kB | 1.45 kB | |
hooks.html gzip | 1.08 kB | 1.08 kB | |
index.js gzip | 289 kB | 290 kB | |
link.js gzip | 319 kB | 320 kB | |
routerDirect.js gzip | 316 kB | 316 kB | |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.53 MB |
Commit: 0c9ebc7
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
buildDuration | 10.6s | 10.8s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.04 kB | |
link.html gzip | 1.04 kB | 1.04 kB | ✓ |
withRouter.html gzip | 1.03 kB | 1.03 kB | |
Overall change | 3.11 kB | 3.11 kB |
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 main-HASH.module.js
@@ -17,6 +17,40 @@ window.next = next;
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -191,30 +225,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -276,6 +313,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
class Container extends _react.default.Component {
componentDidCatch(err, info) {
@@ -399,6 +437,7 @@ var _default = async function _default(_temp) {
props,
err
} = _ref3;
+ isServerRoute = false;
render({
App,
Component,
@@ -575,9 +614,14 @@ function AppContainer(_ref4) {
}).catch(err => console.error('Error rendering page: ', err))
}, _react.default.createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react.default.createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react.default.createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = App => props => {
Diff for main-HASH.js
@@ -67,6 +67,40 @@ module.exports = __webpack_require__("+plK");
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -272,30 +306,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -358,6 +395,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
var Container =
/*#__PURE__*/
@@ -530,6 +568,7 @@ var _default = function _default(_temp) {
var Component = _ref3.Component,
props = _ref3.props,
err = _ref3.err;
+ isServerRoute = false;
render({
App: App,
Component: Component,
@@ -793,9 +832,14 @@ function AppContainer(_ref4) {
}
}, _react["default"].createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react["default"].createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react["default"].createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = function wrapApp(App) {
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 add/use-fallback | Change | |
---|---|---|---|
buildDuration | 11.5s | 11.5s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 add/use-fallback | Change | |
---|---|---|---|
_error.js gzip | 290 kB | 290 kB | -396 B |
404.html gzip | 1.44 kB | 1.45 kB | |
hooks.html gzip | 1.08 kB | 1.08 kB | |
index.js gzip | 289 kB | 290 kB | |
link.js gzip | 319 kB | 320 kB | |
routerDirect.js gzip | 316 kB | 317 kB | |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.53 MB |
Commit: f904eae
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
buildDuration | 11.9s | 11.6s | -256ms |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.04 kB | |
link.html gzip | 1.04 kB | 1.04 kB | ✓ |
withRouter.html gzip | 1.03 kB | 1.03 kB | |
Overall change | 3.11 kB | 3.11 kB |
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 main-HASH.module.js
@@ -17,6 +17,40 @@ window.next = next;
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -191,30 +225,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -276,6 +313,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
class Container extends _react.default.Component {
componentDidCatch(err, info) {
@@ -399,6 +437,7 @@ var _default = async function _default(_temp) {
props,
err
} = _ref3;
+ isServerRoute = false;
render({
App,
Component,
@@ -575,9 +614,14 @@ function AppContainer(_ref4) {
}).catch(err => console.error('Error rendering page: ', err))
}, _react.default.createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react.default.createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react.default.createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = App => props => {
Diff for main-HASH.js
@@ -67,6 +67,40 @@ module.exports = __webpack_require__("+plK");
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -272,30 +306,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -358,6 +395,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
var Container =
/*#__PURE__*/
@@ -530,6 +568,7 @@ var _default = function _default(_temp) {
var Component = _ref3.Component,
props = _ref3.props,
err = _ref3.err;
+ isServerRoute = false;
render({
App: App,
Component: Component,
@@ -793,9 +832,14 @@ function AppContainer(_ref4) {
}
}, _react["default"].createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react["default"].createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And iff the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react["default"].createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = function wrapApp(App) {
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-242243cef3104c84f42c.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-997ff434ce5cd95c9bf4.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-aa81b944e033bb500ee0.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-6ecc3c2ab70efffa8269.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-aa81b944e033bb500ee0.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 add/use-fallback | Change | |
---|---|---|---|
buildDuration | 13.5s | 13.4s | -153ms |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 add/use-fallback | Change | |
---|---|---|---|
_error.js gzip | 290 kB | 290 kB | |
404.html gzip | 1.44 kB | 1.45 kB | |
hooks.html gzip | 1.08 kB | 1.08 kB | |
index.js gzip | 289 kB | 290 kB | |
link.js gzip | 320 kB | 319 kB | -362 B |
routerDirect.js gzip | 316 kB | 316 kB | -488 B |
withRouter.js gzip | 316 kB | 316 kB | |
Overall change | 1.53 MB | 1.53 MB |
Commit: af27728
lfades
reviewed
Feb 14, 2020
lfades
reviewed
Feb 14, 2020
Stats from current PRDefault Server Mode (Increase detected
|
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
buildDuration | 10.3s | 11.7s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 add/use-fallback | Change | |
---|---|---|---|
index.html gzip | 1.04 kB | 1.03 kB | -1 B |
link.html gzip | 1.04 kB | 1.04 kB | -1 B |
withRouter.html gzip | 1.03 kB | 1.03 kB | -1 B |
Overall change | 3.11 kB | 3.11 kB | -3 B |
Diffs
Diff for main-HASH.module.js
@@ -17,6 +17,40 @@ window.next = next;
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -191,30 +225,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -276,6 +313,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
class Container extends _react.default.Component {
componentDidCatch(err, info) {
@@ -399,6 +437,7 @@ var _default = async function _default(_temp) {
props,
err
} = _ref3;
+ isServerRoute = false;
render({
App,
Component,
@@ -575,9 +614,14 @@ function AppContainer(_ref4) {
}).catch(err => console.error('Error rendering page: ', err))
}, _react.default.createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react.default.createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react.default.createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = App => props => {
Diff for main-HASH.js
@@ -67,6 +67,40 @@ module.exports = __webpack_require__("+plK");
/***/ }),
+/***/ "Bm0E":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _Object$defineProperty = __webpack_require__("hfKm");
+
+var __importStar = this && this.__importStar || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) {
+ if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ }
+ result["default"] = mod;
+ return result;
+};
+
+_Object$defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var React = __importStar(__webpack_require__("q1tI"));
+
+exports.FallbackContext = React.createContext( // This default is only used when a component does not have a matching
+// Provider above it in the tree (e.g. test environment).
+//
+// We default to `true` because that would be the default rendered state
+// in a non-browser scenario (SSR). Tests of components post-fallback should
+// be using in-browser tests.
+true);
+
+/***/ }),
+
/***/ "DqTX":
/***/ (function(module, exports, __webpack_require__) {
@@ -272,30 +306,33 @@ var _extends2 = _interopRequireDefault(__webpack_require__("htGi"));
var _interopRequireWildcard2 = _interopRequireDefault(__webpack_require__("5Uuq"));
+var _router = __webpack_require__("nOHt");
+
+var _querystring = __webpack_require__("s4NR");
+
var _react = _interopRequireDefault(__webpack_require__("q1tI"));
var _reactDom = _interopRequireDefault(__webpack_require__("i8i4"));
-var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
+var _fallbackContext = __webpack_require__("Bm0E");
-var _router = __webpack_require__("nOHt");
+var _headManagerContext = __webpack_require__("FYa8");
var _mitt = _interopRequireDefault(__webpack_require__("dZ6Y"));
-var _utils = __webpack_require__("g/15");
+var _routerContext = __webpack_require__("qOIg");
-var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
+var _isDynamic = __webpack_require__("/jkW");
var envConfig = _interopRequireWildcard3(__webpack_require__("yLiY"));
-var _headManagerContext = __webpack_require__("FYa8");
-
-var _routerContext = __webpack_require__("qOIg");
+var _utils = __webpack_require__("g/15");
-var _querystring = __webpack_require__("s4NR");
+var _headManager = _interopRequireDefault(__webpack_require__("DqTX"));
-var _isDynamic = __webpack_require__("/jkW");
+var _pageLoader = _interopRequireDefault(__webpack_require__("zmvN"));
/* global location */
+/// <reference types="react-dom/experimental" />
if (false) {} else {
@@ -358,6 +395,7 @@ exports.router = router;
var ErrorComponent;
var Component;
var App, onPerfEntry;
+var isServerRoute = true;
var Container =
/*#__PURE__*/
@@ -530,6 +568,7 @@ var _default = function _default(_temp) {
var Component = _ref3.Component,
props = _ref3.props,
err = _ref3.err;
+ isServerRoute = false;
render({
App: App,
Component: Component,
@@ -793,9 +832,14 @@ function AppContainer(_ref4) {
}
}, _react["default"].createElement(_routerContext.RouterContext.Provider, {
value: (0, _router.makePublicRouterInstance)(router)
+ }, _react["default"].createElement(_fallbackContext.FallbackContext.Provider, {
+ value: // Fallback is true iff server-rendered page was a fallback
+ isFallback && // And the router hasn't successfully switched states yet (on
+ // different route or data ready).
+ isServerRoute
}, _react["default"].createElement(_headManagerContext.HeadManagerContext.Provider, {
value: headManager.updateHead
- }, children)));
+ }, children))));
}
var wrapApp = function wrapApp(App) {
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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-0e4aaa7a19fa677d50b2.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-f44450aec03c30836fb4.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-0e4aaa7a19fa677d50b2.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-32ab29eeb1add6d5efe3.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-b82b11f77e5ef69e73a6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-32ab29eeb1add6d5efe3.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-0e4aaa7a19fa677d50b2.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-f44450aec03c30836fb4.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-0e4aaa7a19fa677d50b2.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-32ab29eeb1add6d5efe3.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-b82b11f77e5ef69e73a6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-32ab29eeb1add6d5efe3.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-0e4aaa7a19fa677d50b2.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-f44450aec03c30836fb4.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-0e4aaa7a19fa677d50b2.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.e4f72f83999923141e66.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-32ab29eeb1add6d5efe3.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.5e4d900f5617938f89b6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.e4f72f83999923141e66.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-b82b11f77e5ef69e73a6.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-32ab29eeb1add6d5efe3.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 add/use-fallback | Change | |
---|---|---|---|
buildDuration | 12.1s | 12.4s | |
nodeModulesSize | 52.8 MB | 52.8 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
main-HASH.js gzip | 5.13 kB | 5.18 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..d239.js gzip | 16.2 kB | 16.2 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 add/use-fallback | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.13 kB | 4.17 kB | |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 15.1 kB | 15.1 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 64.6 kB | 64.7 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | Timer/next.js add/use-fallback | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages
zeit/next.js canary | Timer/next.js add/use-fallback | 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.89 kB | ✓ |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.68 kB | 9.68 kB | ✓ |
Client Pages Modern
zeit/next.js canary | Timer/next.js add/use-fallback | 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.46 kB | ✓ |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.22 kB | 7.22 kB | ✓ |
Client Build Manifests
zeit/next.js canary | Timer/next.js add/use-fallback | 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 add/use-fallback | 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 | 290 kB | |
link.js gzip | 319 kB | 319 kB | |
routerDirect.js gzip | 316 kB | 317 kB | |
withRouter.js gzip | 316 kB | 317 kB | |
Overall change | 1.53 MB | 1.54 MB |
Commit: 89ac2f5
Timer
added a commit
to Timer/next.js
that referenced
this pull request
Feb 15, 2020
This adds a `isFallback` property to detect if the page is being rendered in "fallback" mode or normal mode. Accessed via the `useRouter()` hook. --- Closes vercel#10527
Timer
added a commit
that referenced
this pull request
Feb 15, 2020
This adds a `isFallback` property to detect if the page is being rendered in "fallback" mode or normal mode. Accessed via the `useRouter()` hook. --- Closes #10527
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.
This adds a
useFallback()
hook to detect if the page is being rendered in "fallback" mode or normal mode.