Skip to content

Commit

Permalink
Fix aspath for getInitialProps (#20572)
Browse files Browse the repository at this point in the history
Fixes: #20370

> AsPath is incorrect on Server if you use rewrites and getInitialProps. On the server, asPath is the rewritten asPath while on the client asPath ist as given in the request URL.

The same issue was used to happen on `getServersideProps`, but it was fixed in this PR (#17121).
`getInitialProps` needs same fix except when the target is serverless, which has correct `asPath` value.

Additional tests have been added in the `getInitialProps` suite to ensure correct asPath with rewrites.
  • Loading branch information
kaykdm committed Jan 25, 2021
1 parent 88b6ea4 commit 47cb4cf
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 14 deletions.
30 changes: 16 additions & 14 deletions packages/next/next-server/server/next-server.ts
Expand Up @@ -1347,11 +1347,12 @@ export default class Server {
typeof components.Component === 'object' &&
typeof (components.Component as any).renderReqToHTML === 'function'
const isSSG = !!components.getStaticProps
const isServerProps = !!components.getServerSideProps
const hasServerProps = !!components.getServerSideProps
const hasStaticPaths = !!components.getStaticPaths
const hasGetInitialProps = !!(components.Component as any).getInitialProps

// Toggle whether or not this is a Data request
const isDataReq = !!query._nextDataReq && (isSSG || isServerProps)
const isDataReq = !!query._nextDataReq && (isSSG || hasServerProps)
delete query._nextDataReq

// we need to ensure the status code if /404 is visited directly
Expand Down Expand Up @@ -1379,7 +1380,7 @@ export default class Server {
let previewData: string | false | object | undefined
let isPreviewMode = false

if (isServerProps || isSSG) {
if (hasServerProps || isSSG) {

This comment has been minimized.

Copy link
@dangvantu99CM

dangvantu99CM Jan 26, 2021

dg

previewData = tryGetPreviewData(req, res, this.renderOpts.previewProps)
isPreviewMode = previewData !== false
}
Expand Down Expand Up @@ -1603,17 +1604,18 @@ export default class Server {
locale,
locales,
defaultLocale,
// For getServerSideProps we need to ensure we use the original URL
// For getServerSideProps and getInitialProps we need to ensure we use the original URL
// and not the resolved URL to prevent a hydration mismatch on
// asPath
resolvedAsPath: isServerProps
? formatUrl({
// we use the original URL pathname less the _next/data prefix if
// present
pathname: `${urlPathname}${hadTrailingSlash ? '/' : ''}`,
query: origQuery,
})
: resolvedUrl,
resolvedAsPath:
hasServerProps || hasGetInitialProps
? formatUrl({
// we use the original URL pathname less the _next/data prefix if
// present
pathname: `${urlPathname}${hadTrailingSlash ? '/' : ''}`,
query: origQuery,
})
: resolvedUrl,
}

renderResult = await renderToHTML(
Expand Down Expand Up @@ -1720,7 +1722,7 @@ export default class Server {
let resHtml = html

const revalidateOptions =
!this.renderOpts.dev || (isServerProps && !isDataReq)
!this.renderOpts.dev || (hasServerProps && !isDataReq)
? {
private: isPreviewMode,
stateful: !isSSG,
Expand All @@ -1731,7 +1733,7 @@ export default class Server {
if (
!isResSent(res) &&
!isNotFound &&
(isSSG || isDataReq || isServerProps)
(isSSG || isDataReq || hasServerProps)
) {
if (isRedirect && !isDataReq) {
await handleRedirect(pageData)
Expand Down
11 changes: 11 additions & 0 deletions test/integration/getinitialprops/next.config.js
@@ -0,0 +1,11 @@
module.exports = {
// replace me
async rewrites() {
return [
{
source: '/blog/post/:pid',
destination: '/blog/:pid',
},
]
},
}
16 changes: 16 additions & 0 deletions test/integration/getinitialprops/pages/blog/[post].js
@@ -0,0 +1,16 @@
import React from 'react'
import { useRouter } from 'next/router'

const Post = () => {
const router = useRouter()

return (
<>
<div id="as-path">{router.asPath}</div>
</>
)
}

Post.getInitialProps = () => ({ hello: 'hi' })

export default Post
3 changes: 3 additions & 0 deletions test/integration/getinitialprops/pages/index.js
@@ -0,0 +1,3 @@
const page = () => 'hello from sub id'
page.getInitialProps = () => ({ hello: 'hi' })
export default page
1 change: 1 addition & 0 deletions test/integration/getinitialprops/pages/normal.js
@@ -0,0 +1 @@
export default () => <p id="normal-text">a normal page</p>
81 changes: 81 additions & 0 deletions test/integration/getinitialprops/test/index.test.js
@@ -0,0 +1,81 @@
import cheerio from 'cheerio'
import { join } from 'path'
import {
findPort,
launchApp,
killApp,
nextStart,
nextBuild,
renderViaHTTP,
File,
} from 'next-test-utils'

jest.setTimeout(1000 * 60 * 5)
let app
let appPort
const appDir = join(__dirname, '..')
const nextConfig = new File(join(appDir, 'next.config.js'))

const runTests = () => {
it('should have gip in __NEXT_DATA__', async () => {
const html = await renderViaHTTP(appPort, '/')
const $ = cheerio.load(html)
expect(JSON.parse($('#__NEXT_DATA__').text()).gip).toBe(true)
})

it('should not have gip in __NEXT_DATA__ for non-GIP page', async () => {
const html = await renderViaHTTP(appPort, '/normal')
const $ = cheerio.load(html)
expect('gip' in JSON.parse($('#__NEXT_DATA__').text())).toBe(false)
})

it('should have correct router.asPath for direct visit dynamic page', async () => {
const html = await renderViaHTTP(appPort, '/blog/1')
const $ = cheerio.load(html)
expect($('#as-path').text()).toBe('/blog/1')
})

it('should have correct router.asPath for direct visit dynamic page rewrite direct', async () => {
const html = await renderViaHTTP(appPort, '/blog/post/1')
const $ = cheerio.load(html)
expect($('#as-path').text()).toBe('/blog/post/1')
})
}

describe('getInitialProps', () => {
describe('dev mode', () => {
beforeAll(async () => {
appPort = await findPort()
app = await launchApp(appDir, appPort)
})
afterAll(() => killApp(app))

runTests()
})

describe('serverless mode', () => {
beforeAll(async () => {
await nextConfig.replace('// replace me', `target: 'serverless', `)
await nextBuild(appDir)
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(async () => {
await killApp(app)
nextConfig.restore()
})

runTests()
})

describe('production mode', () => {
beforeAll(async () => {
await nextBuild(appDir)
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(() => killApp(app))

runTests()
})
})

1 comment on commit 47cb4cf

@ijjk
Copy link
Member

@ijjk ijjk commented on 47cb4cf Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stats from current release

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
buildDuration 7.9s 8.7s ⚠️ +724ms
nodeModulesSize 61.9 MB 74.9 MB ⚠️ +13 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
/ failed reqs 0 0
/ total time (seconds) 1.84 1.749 -0.09
/ avg req/sec 1358.56 1429.29 +70.73
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.063 1.121 ⚠️ +0.06
/error-in-render avg req/sec 2351.68 2230.15 ⚠️ -121.53
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..9b19.js gzip 11.1 kB 13.1 kB ⚠️ +2.02 kB
framework.HASH.js gzip 39 kB 39 kB ⚠️ +14 B
main-HASH.js gzip 7.2 kB 6.63 kB -562 B
webpack-HASH.js gzip 751 B 751 B
Overall change 58 kB 59.4 kB ⚠️ +1.48 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
polyfills-HASH.js gzip 31 kB 31.3 kB ⚠️ +265 B
Overall change 31 kB 31.3 kB ⚠️ +265 B
Client Pages Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-ed1b0..8fbd.js gzip 3.44 kB 3.46 kB ⚠️ +17 B
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-409b283..e3ab.js gzip 1.32 kB N/A N/A
routerDirect..924c.js gzip 284 B 303 B ⚠️ +19 B
withRouter-7..c13d.js gzip 284 B 302 B ⚠️ +18 B
link-7faf09b..eba4.js gzip N/A 1.64 kB N/A
Overall change 7.73 kB 8.09 kB ⚠️ +368 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 323 B 321 B -2 B
Overall change 323 B 321 B -2 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
index.html gzip 646 B 614 B -32 B
link.html gzip 652 B 620 B -32 B
withRouter.html gzip 639 B 607 B -32 B
Overall change 1.94 kB 1.84 kB -96 B

Diffs

Diff for _buildManifest.js
@@ -1,18 +1,18 @@
 self.__BUILD_MANIFEST = {
   __rewrites: [],
-  "/": ["static\u002Fchunks\u002Fpages\u002Findex-283eed3c1520dcc26e8d.js"],
+  "/": ["static\u002Fchunks\u002Fpages\u002Findex-5219d40a02e71ed7dcbf.js"],
   "/_error": [
-    "static\u002Fchunks\u002Fpages\u002F_error-a0c4519f5ca8e97fa7be.js"
+    "static\u002Fchunks\u002Fpages\u002F_error-e3034768442652eac2c9.js"
   ],
   "/hooks": [
-    "static\u002Fchunks\u002Fpages\u002Fhooks-8001dc76075832ee8949.js"
+    "static\u002Fchunks\u002Fpages\u002Fhooks-1de3df238a86bcb083d4.js"
   ],
-  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-67e857671520c009f99f.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-3a08ad7c5282582ee217.js"],
   "/routerDirect": [
-    "static\u002Fchunks\u002Fpages\u002FrouterDirect-2e9bfd441bd88cd3382e.js"
+    "static\u002Fchunks\u002Fpages\u002FrouterDirect-a5bdcfc87579b1d2776d.js"
   ],
   "/withRouter": [
-    "static\u002Fchunks\u002Fpages\u002FwithRouter-9af1d72bd996729e701e.js"
+    "static\u002Fchunks\u002Fpages\u002FwithRouter-748b809bbc7636857f70.js"
   ],
   sortedPages: [
     "\u002F",
Diff for _error-a0c45..8e97fa7be.js
@@ -461,8 +461,10 @@ Also adds support for deduplicated `key` properties
         var metaCategories = {};
         return function(h) {
           var isUnique = true;
+          var hasKey = false;
 
           if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
+            hasKey = true;
             var key = h.key.slice(h.key.indexOf("$") + 1);
 
             if (keys.has(key)) {
@@ -498,7 +500,10 @@ Also adds support for deduplicated `key` properties
                   var category = h.props[metatype];
                   var categories = metaCategories[metatype] || new Set();
 
-                  if (categories.has(category)) {
+                  if (
+                    (metatype !== "name" || !hasKey) &&
+                    categories.has(category)
+                  ) {
                     isUnique = false;
                   } else {
                     categories.add(category);
Diff for link-3a08ad7..2582ee217.js
@@ -0,0 +1,435 @@
+_N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
+  [8],
+  {
+    /***/ ObF3: /***/ function(
+      module,
+      __webpack_exports__,
+      __webpack_require__
+    ) {
+      "use strict";
+      __webpack_require__.r(__webpack_exports__);
+      /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
+        "q1tI"
+      );
+      /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(
+        react__WEBPACK_IMPORTED_MODULE_0__
+      );
+      /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
+        "YFqc"
+      );
+      /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
+        next_link__WEBPACK_IMPORTED_MODULE_1__
+      );
+
+      var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
+
+      function aLink(props) {
+        return __jsx(
+          "div",
+          null,
+          __jsx("h3", null, "A Link page!"),
+          __jsx(
+            next_link__WEBPACK_IMPORTED_MODULE_1___default.a,
+            {
+              href: "/"
+            },
+            "Go to /"
+          )
+        );
+      }
+
+      aLink.getInitialProps = function() {
+        return {};
+      };
+
+      /* harmony default export */ __webpack_exports__["default"] = aLink;
+
+      /***/
+    },
+
+    /***/ V8Sf: /***/ function(module, exports, __webpack_require__) {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/link",
+        function() {
+          return __webpack_require__("ObF3");
+        }
+      ]);
+
+      /***/
+    },
+
+    /***/ YFqc: /***/ function(module, exports, __webpack_require__) {
+      module.exports = __webpack_require__("cTJO");
+
+      /***/
+    },
+
+    /***/ cTJO: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      var _slicedToArray = __webpack_require__("J4zp");
+
+      var _interopRequireWildcard = __webpack_require__("284h");
+
+      exports.__esModule = true;
+      exports["default"] = void 0;
+
+      var _react = _interopRequireWildcard(__webpack_require__("q1tI"));
+
+      var _router = __webpack_require__("elyg");
+
+      var _router2 = __webpack_require__("nOHt");
+
+      var _useIntersection = __webpack_require__("vNVm");
+
+      var prefetched = {};
+
+      function prefetch(router, href, as, options) {
+        if (false || !router) return;
+        if (!(0, _router.isLocalURL)(href)) return; // Prefetch the JSON page if asked (only in the client)
+        // We need to handle a prefetch error here since we may be
+        // loading with priority which can reject but we don't
+        // want to force navigation since this is only a prefetch
+
+        router.prefetch(href, as, options)["catch"](function(err) {
+          if (false) {
+          }
+        });
+        var curLocale =
+          options && typeof options.locale !== "undefined"
+            ? options.locale
+            : router && router.locale; // Join on an invalid URI character
+
+        prefetched[href + "%" + as + (curLocale ? "%" + curLocale : "")] = true;
+      }
+
+      function isModifiedEvent(event) {
+        var target = event.currentTarget.target;
+        return (
+          (target && target !== "_self") ||
+          event.metaKey ||
+          event.ctrlKey ||
+          event.shiftKey ||
+          event.altKey || // triggers resource download
+          (event.nativeEvent && event.nativeEvent.which === 2)
+        );
+      }
+
+      function linkClicked(
+        e,
+        router,
+        href,
+        as,
+        replace,
+        shallow,
+        scroll,
+        locale
+      ) {
+        var nodeName = e.currentTarget.nodeName;
+
+        if (
+          nodeName === "A" &&
+          (isModifiedEvent(e) || !(0, _router.isLocalURL)(href))
+        ) {
+          // ignore click for browser’s default behavior
+          return;
+        }
+
+        e.preventDefault(); //  avoid scroll for urls with anchor refs
+
+        if (scroll == null) {
+          scroll = as.indexOf("#") < 0;
+        } // replace state instead of push if prop is present
+
+        router[replace ? "replace" : "push"](href, as, {
+          shallow: shallow,
+          locale: locale,
+          scroll: scroll
+        }).then(function(success) {
+          if (!success) return;
+
+          if (scroll) {
+            // FIXME: proper route announcing at Router level, not Link:
+            document.body.focus();
+          }
+        });
+      }
+
+      function Link(props) {
+        if (false) {
+          var hasWarned,
+            optionalProps,
+            optionalPropsGuard,
+            requiredProps,
+            requiredPropsGuard,
+            createPropError;
+        }
+
+        var p = props.prefetch !== false;
+        var router = (0, _router2.useRouter)();
+        var pathname = (router && router.pathname) || "/";
+
+        var _react$default$useMem = _react["default"].useMemo(
+            function() {
+              var _ref = (0, _router.resolveHref)(pathname, props.href, true),
+                _ref2 = _slicedToArray(_ref, 2),
+                resolvedHref = _ref2[0],
+                resolvedAs = _ref2[1];
+
+              return {
+                href: resolvedHref,
+                as: props.as
+                  ? (0, _router.resolveHref)(pathname, props.as)
+                  : resolvedAs || resolvedHref
+              };
+            },
+            [pathname, props.href, props.as]
+          ),
+          href = _react$default$useMem.href,
+          as = _react$default$useMem.as;
+
+        var children = props.children,
+          replace = props.replace,
+          shallow = props.shallow,
+          scroll = props.scroll,
+          locale = props.locale; // Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag
+
+        if (typeof children === "string") {
+          children = /*#__PURE__*/ _react["default"].createElement(
+            "a",
+            null,
+            children
+          );
+        } // This will return the first child, if multiple are provided it will throw an error
+
+        var child = _react.Children.only(children);
+
+        var childRef = child && typeof child === "object" && child.ref;
+
+        var _ref3 = (0, _useIntersection.useIntersection)({
+            rootMargin: "200px"
+          }),
+          _ref4 = _slicedToArray(_ref3, 2),
+          setIntersectionRef = _ref4[0],
+          isVisible = _ref4[1];
+
+        var setRef = _react["default"].useCallback(
+          function(el) {
+            setIntersectionRef(el);
+
+            if (childRef) {
+              if (typeof childRef === "function") childRef(el);
+              else if (typeof childRef === "object") {
+                childRef.current = el;
+              }
+            }
+          },
+          [childRef, setIntersectionRef]
+        );
+
+        (0, _react.useEffect)(
+          function() {
+            var shouldPrefetch =
+              isVisible && p && (0, _router.isLocalURL)(href);
+            var curLocale =
+              typeof locale !== "undefined" ? locale : router && router.locale;
+            var isPrefetched =
+              prefetched[href + "%" + as + (curLocale ? "%" + curLocale : "")];
+
+            if (shouldPrefetch && !isPrefetched) {
+              prefetch(router, href, as, {
+                locale: curLocale
+              });
+            }
+          },
+          [as, href, isVisible, locale, p, router]
+        );
+        var childProps = {
+          ref: setRef,
+          onClick: function onClick(e) {
+            if (child.props && typeof child.props.onClick === "function") {
+              child.props.onClick(e);
+            }
+
+            if (!e.defaultPrevented) {
+              linkClicked(
+                e,
+                router,
+                href,
+                as,
+                replace,
+                shallow,
+                scroll,
+                locale
+              );
+            }
+          }
+        };
+
+        childProps.onMouseEnter = function(e) {
+          if (!(0, _router.isLocalURL)(href)) return;
+
+          if (child.props && typeof child.props.onMouseEnter === "function") {
+            child.props.onMouseEnter(e);
+          }
+
+          prefetch(router, href, as, {
+            priority: true
+          });
+        }; // If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is
+        // defined, we specify the current 'href', so that repetition is not needed by the user
+
+        if (
+          props.passHref ||
+          (child.type === "a" && !("href" in child.props))
+        ) {
+          var curLocale =
+            typeof locale !== "undefined" ? locale : router && router.locale;
+          var localeDomain = (0, _router.getDomainLocale)(
+            as,
+            curLocale,
+            router && router.locales,
+            router && router.domainLocales
+          );
+          childProps.href =
+            localeDomain ||
+            (0, _router.addBasePath)(
+              (0, _router.addLocale)(
+                as,
+                curLocale,
+                router && router.defaultLocale
+              )
+            );
+        }
+
+        return /*#__PURE__*/ _react["default"].cloneElement(child, childProps);
+      }
+
+      var _default = Link;
+      exports["default"] = _default;
+
+      /***/
+    },
+
+    /***/ vNVm: /***/ function(module, exports, __webpack_require__) {
+      "use strict";
+
+      var _slicedToArray = __webpack_require__("J4zp");
+
+      var _interopRequireDefault = __webpack_require__("TqRt");
+
+      exports.__esModule = true;
+      exports.useIntersection = useIntersection;
+
+      var _react = __webpack_require__("q1tI");
+
+      var _requestIdleCallback = _interopRequireDefault(
+        __webpack_require__("0G5g")
+      );
+
+      var hasIntersectionObserver = typeof IntersectionObserver !== "undefined";
+
+      function useIntersection(_ref) {
+        var rootMargin = _ref.rootMargin,
+          disabled = _ref.disabled;
+        var isDisabled = disabled || !hasIntersectionObserver;
+        var unobserve = (0, _react.useRef)();
+
+        var _ref2 = (0, _react.useState)(false),
+          _ref3 = _slicedToArray(_ref2, 2),
+          visible = _ref3[0],
+          setVisible = _ref3[1];
+
+        var setRef = (0, _react.useCallback)(
+          function(el) {
+            if (unobserve.current) {
+              unobserve.current();
+              unobserve.current = undefined;
+            }
+
+            if (isDisabled || visible) return;
+
+            if (el && el.tagName) {
+              unobserve.current = observe(
+                el,
+                function(isVisible) {
+                  return isVisible && setVisible(isVisible);
+                },
+                {
+                  rootMargin: rootMargin
+                }
+              );
+            }
+          },
+          [isDisabled, rootMargin, visible]
+        );
+        (0, _react.useEffect)(
+          function() {
+            if (!hasIntersectionObserver) {
+              if (!visible)
+                (0, _requestIdleCallback["default"])(function() {
+                  return setVisible(true);
+                });
+            }
+          },
+          [visible]
+        );
+        return [setRef, visible];
+      }
+
+      function observe(element, callback, options) {
+        var _createObserver = createObserver(options),
+          id = _createObserver.id,
+          observer = _createObserver.observer,
+          elements = _createObserver.elements;
+
+        elements.set(element, callback);
+        observer.observe(element);
+        return function unobserve() {
+          elements["delete"](element);
+          observer.unobserve(element); // Destroy observer when there's nothing left to watch:
+
+          if (elements.size === 0) {
+            observer.disconnect();
+            observers["delete"](id);
+          }
+        };
+      }
+
+      var observers = new Map();
+
+      function createObserver(options) {
+        var id = options.rootMargin || "";
+        var instance = observers.get(id);
+
+        if (instance) {
+          return instance;
+        }
+
+        var elements = new Map();
+        var observer = new IntersectionObserver(function(entries) {
+          entries.forEach(function(entry) {
+            var callback = elements.get(entry.target);
+            var isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
+
+            if (callback && isVisible) {
+              callback(isVisible);
+            }
+          });
+        }, options);
+        observers.set(
+          id,
+          (instance = {
+            id: id,
+            observer: observer,
+            elements: elements
+          })
+        );
+        return instance;
+      }
+
+      /***/
+    }
+  },
+  [["V8Sf", 0, 1, 2]]
+]);
Diff for link-67e8576..0c009f99f.js
deleted
Diff for routerDirect..88cd3382e.js
@@ -1,6 +1,12 @@
 _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
   [9],
   {
+    /***/ "20a2": /***/ function(module, exports, __webpack_require__) {
+      module.exports = __webpack_require__("nOHt");
+
+      /***/
+    },
+
     /***/ LtRI: /***/ function(module, exports, __webpack_require__) {
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/routerDirect",
@@ -26,7 +32,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         react__WEBPACK_IMPORTED_MODULE_0__
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        "nOHt"
+        "20a2"
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_router__WEBPACK_IMPORTED_MODULE_1__
Diff for withRouter-9..6729e701e.js
@@ -15,7 +15,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
         react__WEBPACK_IMPORTED_MODULE_0__
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
-        "nOHt"
+        "20a2"
       );
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
         next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -38,6 +38,12 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
       /***/
     },
 
+    /***/ "20a2": /***/ function(module, exports, __webpack_require__) {
+      module.exports = __webpack_require__("nOHt");
+
+      /***/
+    },
+
     /***/ eThv: /***/ function(module, exports, __webpack_require__) {
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/withRouter",
Diff for 677f882d2ed8..4eeebf399.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for polyfills-HASH.js
failed to diff
Diff for index.html
@@ -3,10 +3,11 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
-    <noscript data-n-css="true"></noscript>
+    <meta name="next-head-count" content="2" />
+    <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-2aa8068f0cc281f09665.js"
+      href="/_next/static/chunks/main-dbd6e5f9cd81f8c32cda.js"
       as="script"
     />
     <link
@@ -21,17 +22,17 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-7512045a5b3d9376e2ca.js"
+      href="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/index-283eed3c1520dcc26e8d.js"
+      href="/_next/static/chunks/pages/index-5219d40a02e71ed7dcbf.js"
       as="script"
     />
   </head>
@@ -44,19 +45,15 @@
         "query": {},
         "buildId": "BUILD_ID",
         "isFallback": false,
-        "gip": true,
-        "head": [
-          ["meta", { "charSet": "utf-8" }],
-          ["meta", { "name": "viewport", "content": "width=device-width" }]
-        ]
+        "gip": true
       }
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-7cd0807c85ae48513b2d.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-2aa8068f0cc281f09665.js"
+      src="/_next/static/chunks/main-dbd6e5f9cd81f8c32cda.js"
       async=""
     ></script>
     <script
@@ -68,15 +65,15 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-7512045a5b3d9376e2ca.js"
+      src="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/index-283eed3c1520dcc26e8d.js"
+      src="/_next/static/chunks/pages/index-5219d40a02e71ed7dcbf.js"
       async=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for link.html
@@ -3,10 +3,11 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
-    <noscript data-n-css="true"></noscript>
+    <meta name="next-head-count" content="2" />
+    <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-2aa8068f0cc281f09665.js"
+      href="/_next/static/chunks/main-dbd6e5f9cd81f8c32cda.js"
       as="script"
     />
     <link
@@ -21,17 +22,17 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-7512045a5b3d9376e2ca.js"
+      href="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/link-67e857671520c009f99f.js"
+      href="/_next/static/chunks/pages/link-3a08ad7c5282582ee217.js"
       as="script"
     />
   </head>
@@ -49,19 +50,15 @@
         "query": {},
         "buildId": "BUILD_ID",
         "isFallback": false,
-        "gip": true,
-        "head": [
-          ["meta", { "charSet": "utf-8" }],
-          ["meta", { "name": "viewport", "content": "width=device-width" }]
-        ]
+        "gip": true
       }
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-7cd0807c85ae48513b2d.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-2aa8068f0cc281f09665.js"
+      src="/_next/static/chunks/main-dbd6e5f9cd81f8c32cda.js"
       async=""
     ></script>
     <script
@@ -73,15 +70,15 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-7512045a5b3d9376e2ca.js"
+      src="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-67e857671520c009f99f.js"
+      src="/_next/static/chunks/pages/link-3a08ad7c5282582ee217.js"
       async=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -3,10 +3,11 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
-    <noscript data-n-css="true"></noscript>
+    <meta name="next-head-count" content="2" />
+    <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-2aa8068f0cc281f09665.js"
+      href="/_next/static/chunks/main-dbd6e5f9cd81f8c32cda.js"
       as="script"
     />
     <link
@@ -21,17 +22,17 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-7512045a5b3d9376e2ca.js"
+      href="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/withRouter-9af1d72bd996729e701e.js"
+      href="/_next/static/chunks/pages/withRouter-748b809bbc7636857f70.js"
       as="script"
     />
   </head>
@@ -44,19 +45,15 @@
         "query": {},
         "buildId": "BUILD_ID",
         "isFallback": false,
-        "gip": true,
-        "head": [
-          ["meta", { "charSet": "utf-8" }],
-          ["meta", { "name": "viewport", "content": "width=device-width" }]
-        ]
+        "gip": true
       }
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
+      src="/_next/static/chunks/polyfills-7cd0807c85ae48513b2d.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-2aa8068f0cc281f09665.js"
+      src="/_next/static/chunks/main-dbd6e5f9cd81f8c32cda.js"
       async=""
     ></script>
     <script
@@ -68,15 +65,15 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5472d08d2594eeebf399.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d59cca9b248dde534236.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-7512045a5b3d9376e2ca.js"
+      src="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/withRouter-9af1d72bd996729e701e.js"
+      src="/_next/static/chunks/pages/withRouter-748b809bbc7636857f70.js"
       async=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
buildDuration 9.3s 10.5s ⚠️ +1.2s
nodeModulesSize 61.9 MB 74.9 MB ⚠️ +13 MB
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..9b19.js gzip 11.1 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB ⚠️ +14 B
main-HASH.js gzip 7.2 kB 6.63 kB -562 B
webpack-HASH.js gzip 751 B 751 B
677f882d2ed8..38ed.js gzip N/A 13.1 kB N/A
Overall change 58 kB 59.4 kB ⚠️ +1.48 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
polyfills-HASH.js gzip 31 kB 31.3 kB ⚠️ +265 B
Overall change 31 kB 31.3 kB ⚠️ +265 B
Client Pages Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-9a0b9e1..b37e.js gzip 1.28 kB N/A N/A
_error-ed1b0..8fbd.js gzip 3.44 kB N/A N/A
hooks-89731c..c609.js gzip 887 B N/A N/A
index-17468f..5d83.js gzip 227 B N/A N/A
link-409b283..e3ab.js gzip 1.32 kB N/A N/A
routerDirect..924c.js gzip 284 B N/A N/A
withRouter-7..c13d.js gzip 284 B N/A N/A
_app-2a09aa2..4a98.js gzip N/A 1.28 kB N/A
_error-8b758..aef6.js gzip N/A 3.46 kB N/A
hooks-c71ae4..70cd.js gzip N/A 887 B N/A
index-bbee2f..528b.js gzip N/A 227 B N/A
link-7faf09b..eba4.js gzip N/A 1.64 kB N/A
routerDirect..bf84.js gzip N/A 303 B N/A
withRouter-a..5826.js gzip N/A 302 B N/A
Overall change 7.73 kB 8.09 kB ⚠️ +368 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 323 B 321 B -2 B
Overall change 323 B 321 B -2 B
Serverless bundles Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_error.js 1.05 MB 1 MB -49.2 kB
404.html 2.6 kB 2.67 kB ⚠️ +69 B
hooks.html 1.98 kB 1.92 kB -60 B
index.js 1.05 MB 1 MB -49.1 kB
link.js 1.1 MB 1.06 MB -37.9 kB
routerDirect.js 1.09 MB 1.05 MB -39.6 kB
withRouter.js 1.09 MB 1.05 MB -39.6 kB
Overall change 5.4 MB 5.19 MB -215 kB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
buildDuration 8s 10.6s ⚠️ +2.6s
nodeModulesSize 61.9 MB 74.9 MB ⚠️ +13 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
/ failed reqs 0 0
/ total time (seconds) 1.84 1.759 -0.08
/ avg req/sec 1358.74 1421.12 +62.38
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.046 1.106 ⚠️ +0.06
/error-in-render avg req/sec 2389.06 2260.1 ⚠️ -128.96
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
677f882d2ed8..9b19.js gzip 11.1 kB 13 kB ⚠️ +1.97 kB
framework.HASH.js gzip 39 kB 39.3 kB ⚠️ +315 B
main-HASH.js gzip 7.2 kB 6.58 kB -613 B
webpack-HASH.js gzip 751 B 954 B ⚠️ +203 B
Overall change 58 kB 59.8 kB ⚠️ +1.88 kB
Legacy Client Bundles (polyfills) Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
polyfills-HASH.js gzip 31 kB 31.1 kB ⚠️ +100 B
Overall change 31 kB 31.1 kB ⚠️ +100 B
Client Pages Overall increase ⚠️
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.26 kB -23 B
_error-ed1b0..8fbd.js gzip 3.44 kB 3.38 kB -54 B
hooks-89731c..c609.js gzip 887 B 904 B ⚠️ +17 B
index-17468f..5d83.js gzip 227 B N/A N/A
link-409b283..e3ab.js gzip 1.32 kB N/A N/A
routerDirect..924c.js gzip 284 B N/A N/A
withRouter-7..c13d.js gzip 284 B N/A N/A
index-939503..6e1c.js gzip N/A 232 B N/A
link-e0cc871..fdbb.js gzip N/A 1.63 kB N/A
routerDirect..9360.js gzip N/A 308 B N/A
withRouter-6..44ec.js gzip N/A 304 B N/A
Overall change 7.73 kB 8.02 kB ⚠️ +293 B
Client Build Manifests Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
_buildManifest.js gzip 323 B 299 B -24 B
Overall change 323 B 299 B -24 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary v9.5.5 vercel/next.js refs/heads/canary Change
index.html gzip 646 B 587 B -59 B
link.html gzip 652 B 591 B -61 B
withRouter.html gzip 639 B 580 B -59 B
Overall change 1.94 kB 1.76 kB -179 B

Diffs

Diff for _buildManifest.js
@@ -1,18 +1,18 @@
 self.__BUILD_MANIFEST = {
   __rewrites: [],
-  "/": ["static\u002Fchunks\u002Fpages\u002Findex-17468f84201180ea5d83.js"],
+  "/": ["static\u002Fchunks\u002Fpages\u002Findex-bbee2f759744105f528b.js"],
   "/_error": [
-    "static\u002Fchunks\u002Fpages\u002F_error-ed1b06dc12d6382f8fbd.js"
+    "static\u002Fchunks\u002Fpages\u002F_error-8b758797fbfd831caef6.js"
   ],
   "/hooks": [
-    "static\u002Fchunks\u002Fpages\u002Fhooks-89731c730ea64db1c609.js"
+    "static\u002Fchunks\u002Fpages\u002Fhooks-c71ae457cac4fc1870cd.js"
   ],
-  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-409b283987ce588fe3ab.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-7faf09bd68ceb178eba4.js"],
   "/routerDirect": [
-    "static\u002Fchunks\u002Fpages\u002FrouterDirect-6d2fb329d4d2078b924c.js"
+    "static\u002Fchunks\u002Fpages\u002FrouterDirect-f52980aaab8f3c73bf84.js"
   ],
   "/withRouter": [
-    "static\u002Fchunks\u002Fpages\u002FwithRouter-7532e31ac7fbedf2c13d.js"
+    "static\u002Fchunks\u002Fpages\u002FwithRouter-a26671519f5f31515826.js"
   ],
   sortedPages: [
     "\u002F",
Diff for _error-ed1b0..6382f8fbd.js
@@ -268,14 +268,16 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
                 n = new Set(),
                 r = {};
               return function(o) {
-                var a = !0;
+                var a = !0,
+                  i = !1;
                 if (
                   o.key &&
                   "number" !== typeof o.key &&
                   o.key.indexOf("$") > 0
                 ) {
-                  var i = o.key.slice(o.key.indexOf("$") + 1);
-                  e.has(i) ? (a = !1) : e.add(i);
+                  i = !0;
+                  var u = o.key.slice(o.key.indexOf("$") + 1);
+                  e.has(u) ? (a = !1) : e.add(u);
                 }
                 switch (o.type) {
                   case "title":
@@ -283,14 +285,16 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
                     t.has(o.type) ? (a = !1) : t.add(o.type);
                     break;
                   case "meta":
-                    for (var u = 0, c = p.length; u < c; u++) {
-                      var s = p[u];
-                      if (o.props.hasOwnProperty(s))
-                        if ("charSet" === s) n.has(s) ? (a = !1) : n.add(s);
+                    for (var c = 0, s = p.length; c < s; c++) {
+                      var f = p[c];
+                      if (o.props.hasOwnProperty(f))
+                        if ("charSet" === f) n.has(f) ? (a = !1) : n.add(f);
                         else {
-                          var f = o.props[s],
-                            l = r[s] || new Set();
-                          l.has(f) ? (a = !1) : (l.add(f), (r[s] = l));
+                          var l = o.props[f],
+                            d = r[f] || new Set();
+                          ("name" === f && i) || !d.has(l)
+                            ? (d.add(l), (r[f] = d))
+                            : (a = !1);
                         }
                     }
                 }
Diff for link-409b283..e588fe3ab.js
deleted
Diff for link-7faf09b..eb178eba4.js
@@ -0,0 +1,248 @@
+_N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
+  [8],
+  {
+    ObF3: function(e, n, t) {
+      "use strict";
+      t.r(n);
+      var r = t("q1tI"),
+        o = t.n(r),
+        a = t("YFqc"),
+        c = t.n(a),
+        u = o.a.createElement;
+      function i(e) {
+        return u(
+          "div",
+          null,
+          u("h3", null, "A Link page!"),
+          u(c.a, { href: "/" }, "Go to /")
+        );
+      }
+      (i.getInitialProps = function() {
+        return {};
+      }),
+        (n.default = i);
+    },
+    V8Sf: function(e, n, t) {
+      (window.__NEXT_P = window.__NEXT_P || []).push([
+        "/link",
+        function() {
+          return t("ObF3");
+        }
+      ]);
+    },
+    YFqc: function(e, n, t) {
+      e.exports = t("cTJO");
+    },
+    cTJO: function(e, n, t) {
+      "use strict";
+      var r = t("J4zp"),
+        o = t("284h");
+      (n.__esModule = !0), (n.default = void 0);
+      var a = o(t("q1tI")),
+        c = t("elyg"),
+        u = t("nOHt"),
+        i = t("vNVm"),
+        f = {};
+      function l(e, n, t, r) {
+        if (e && (0, c.isLocalURL)(n)) {
+          e.prefetch(n, t, r).catch(function(e) {
+            0;
+          });
+          var o =
+            r && "undefined" !== typeof r.locale ? r.locale : e && e.locale;
+          f[n + "%" + t + (o ? "%" + o : "")] = !0;
+        }
+      }
+      var s = function(e) {
+        var n = !1 !== e.prefetch,
+          t = (0, u.useRouter)(),
+          o = (t && t.pathname) || "/",
+          s = a.default.useMemo(
+            function() {
+              var n = (0, c.resolveHref)(o, e.href, !0),
+                t = r(n, 2),
+                a = t[0],
+                u = t[1];
+              return {
+                href: a,
+                as: e.as ? (0, c.resolveHref)(o, e.as) : u || a
+              };
+            },
+            [o, e.href, e.as]
+          ),
+          p = s.href,
+          d = s.as,
+          v = e.children,
+          h = e.replace,
+          y = e.shallow,
+          g = e.scroll,
+          _ = e.locale;
+        "string" === typeof v && (v = a.default.createElement("a", null, v));
+        var b = a.Children.only(v),
+          w = b && "object" === typeof b && b.ref,
+          E = (0, i.useIntersection)({ rootMargin: "200px" }),
+          m = r(E, 2),
+          L = m[0],
+          M = m[1],
+          k = a.default.useCallback(
+            function(e) {
+              L(e),
+                w &&
+                  ("function" === typeof w
+                    ? w(e)
+                    : "object" === typeof w && (w.current = e));
+            },
+            [w, L]
+          );
+        (0, a.useEffect)(
+          function() {
+            var e = M && n && (0, c.isLocalURL)(p),
+              r = "undefined" !== typeof _ ? _ : t && t.locale,
+              o = f[p + "%" + d + (r ? "%" + r : "")];
+            e && !o && l(t, p, d, { locale: r });
+          },
+          [d, p, M, _, n, t]
+        );
+        var I = {
+          ref: k,
+          onClick: function(e) {
+            b.props &&
+              "function" === typeof b.props.onClick &&
+              b.props.onClick(e),
+              e.defaultPrevented ||
+                (function(e, n, t, r, o, a, u, i) {
+                  ("A" !== e.currentTarget.nodeName ||
+                    (!(function(e) {
+                      var n = e.currentTarget.target;
+                      return (
+                        (n && "_self" !== n) ||
+                        e.metaKey ||
+                        e.ctrlKey ||
+                        e.shiftKey ||
+                        e.altKey ||
+                        (e.nativeEvent && 2 === e.nativeEvent.which)
+                      );
+                    })(e) &&
+                      (0, c.isLocalURL)(t))) &&
+                    (e.preventDefault(),
+                    null == u && (u = r.indexOf("#") < 0),
+                    n[o ? "replace" : "push"](t, r, {
+                      shallow: a,
+                      locale: i,
+                      scroll: u
+                    }).then(function(e) {
+                      e && u && document.body.focus();
+                    }));
+                })(e, t, p, d, h, y, g, _);
+          },
+          onMouseEnter: function(e) {
+            (0, c.isLocalURL)(p) &&
+              (b.props &&
+                "function" === typeof b.props.onMouseEnter &&
+                b.props.onMouseEnter(e),
+              l(t, p, d, { priority: !0 }));
+          }
+        };
+        if (e.passHref || ("a" === b.type && !("href" in b.props))) {
+          var N = "undefined" !== typeof _ ? _ : t && t.locale,
+            O = (0, c.getDomainLocale)(
+              d,
+              N,
+              t && t.locales,
+              t && t.domainLocales
+            );
+          I.href =
+            O ||
+            (0, c.addBasePath)((0, c.addLocale)(d, N, t && t.defaultLocale));
+        }
+        return a.default.cloneElement(b, I);
+      };
+      n.default = s;
+    },
+    vNVm: function(e, n, t) {
+      "use strict";
+      var r = t("J4zp"),
+        o = t("TqRt");
+      (n.__esModule = !0),
+        (n.useIntersection = function(e) {
+          var n = e.rootMargin,
+            t = e.disabled || !u,
+            o = (0, a.useRef)(),
+            f = (0, a.useState)(!1),
+            l = r(f, 2),
+            s = l[0],
+            p = l[1],
+            d = (0, a.useCallback)(
+              function(e) {
+                o.current && (o.current(), (o.current = void 0)),
+                  t ||
+                    s ||
+                    (e &&
+                      e.tagName &&
+                      (o.current = (function(e, n, t) {
+                        var r = (function(e) {
+                            var n = e.rootMargin || "",
+                              t = i.get(n);
+                            if (t) return t;
+                            var r = new Map(),
+                              o = new IntersectionObserver(function(e) {
+                                e.forEach(function(e) {
+                                  var n = r.get(e.target),
+                                    t =
+                                      e.isIntersecting ||
+                                      e.intersectionRatio > 0;
+                                  n && t && n(t);
+                                });
+                              }, e);
+                            return (
+                              i.set(
+                                n,
+                                (t = { id: n, observer: o, elements: r })
+                              ),
+                              t
+                            );
+                          })(t),
+                          o = r.id,
+                          a = r.observer,
+                          c = r.elements;
+                        return (
+                          c.set(e, n),
+                          a.observe(e),
+                          function() {
+                            c.delete(e),
+                              a.unobserve(e),
+                              0 === c.size && (a.disconnect(), i.delete(o));
+                          }
+                        );
+                      })(
+                        e,
+                        function(e) {
+                          return e && p(e);
+                        },
+                        { rootMargin: n }
+                      )));
+              },
+              [t, n, s]
+            );
+          return (
+            (0, a.useEffect)(
+              function() {
+                u ||
+                  s ||
+                  (0, c.default)(function() {
+                    return p(!0);
+                  });
+              },
+              [s]
+            ),
+            [d, s]
+          );
+        });
+      var a = t("q1tI"),
+        c = o(t("0G5g")),
+        u = "undefined" !== typeof IntersectionObserver;
+      var i = new Map();
+    }
+  },
+  [["V8Sf", 0, 1, 2]]
+]);
Diff for routerDirect..2078b924c.js
@@ -1,6 +1,9 @@
 _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
   [9],
   {
+    "20a2": function(t, n, r) {
+      t.exports = r("nOHt");
+    },
     LtRI: function(t, n, r) {
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/routerDirect",
@@ -14,7 +17,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
       r.r(n);
       var e = r("q1tI"),
         i = r.n(e),
-        o = (r("nOHt"), i.a.createElement);
+        o = (r("20a2"), i.a.createElement);
       function u(t) {
         return o("div", null, "I import the router directly");
       }
Diff for withRouter-7..bedf2c13d.js
@@ -6,7 +6,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
       e.r(t);
       var u = e("q1tI"),
         i = e.n(u),
-        o = e("nOHt"),
+        o = e("20a2"),
         r = i.a.createElement;
       function w(n) {
         return r("div", null, "I use withRouter");
@@ -16,6 +16,9 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
       }),
         (t.default = Object(o.withRouter)(w));
     },
+    "20a2": function(n, t, e) {
+      n.exports = e("nOHt");
+    },
     eThv: function(n, t, e) {
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/withRouter",
Diff for 677f882d2ed8..236c59b19.js

Diff too large to display

Diff for framework.HASH.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for polyfills-HASH.js
failed to diff
Diff for index.html
@@ -3,35 +3,36 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
-    <noscript data-n-css="true"></noscript>
+    <meta name="next-head-count" content="2" />
+    <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-79d6d556cd81f503698e.js"
+      href="/_next/static/chunks/main-d2c3a87faf79060c4e10.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js"
+      href="/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/framework.aa73b1c70e7f3e2c7893.js"
+      href="/_next/static/chunks/framework.dc46d8e6c07122d5fb16.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a36a385313236c59b19.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-9a0b9e10c258d464b37e.js"
+      href="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/index-17468f84201180ea5d83.js"
+      href="/_next/static/chunks/pages/index-bbee2f759744105f528b.js"
       as="script"
     />
   </head>
@@ -42,49 +43,45 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "Iqu4tXbd5_HMptfd1yVIE",
+        "buildId": "42UB7b9B9khIzhYXqkNjM",
         "isFallback": false,
-        "gip": true,
-        "head": [
-          ["meta", { "charSet": "utf-8" }],
-          ["meta", { "name": "viewport", "content": "width=device-width" }]
-        ]
+        "gip": true
       }
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-4bf92a23c2c54952e242.js"
+      src="/_next/static/chunks/polyfills-af28de04c604a2479390.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-79d6d556cd81f503698e.js"
+      src="/_next/static/chunks/main-d2c3a87faf79060c4e10.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js"
+      src="/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/framework.aa73b1c70e7f3e2c7893.js"
+      src="/_next/static/chunks/framework.dc46d8e6c07122d5fb16.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a36a385313236c59b19.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-9a0b9e10c258d464b37e.js"
+      src="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/index-17468f84201180ea5d83.js"
+      src="/_next/static/chunks/pages/index-bbee2f759744105f528b.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Iqu4tXbd5_HMptfd1yVIE/_buildManifest.js"
+      src="/_next/static/42UB7b9B9khIzhYXqkNjM/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Iqu4tXbd5_HMptfd1yVIE/_ssgManifest.js"
+      src="/_next/static/42UB7b9B9khIzhYXqkNjM/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -3,35 +3,36 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
-    <noscript data-n-css="true"></noscript>
+    <meta name="next-head-count" content="2" />
+    <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-79d6d556cd81f503698e.js"
+      href="/_next/static/chunks/main-d2c3a87faf79060c4e10.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js"
+      href="/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/framework.aa73b1c70e7f3e2c7893.js"
+      href="/_next/static/chunks/framework.dc46d8e6c07122d5fb16.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a36a385313236c59b19.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-9a0b9e10c258d464b37e.js"
+      href="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/link-409b283987ce588fe3ab.js"
+      href="/_next/static/chunks/pages/link-7faf09bd68ceb178eba4.js"
       as="script"
     />
   </head>
@@ -47,49 +48,45 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "Iqu4tXbd5_HMptfd1yVIE",
+        "buildId": "42UB7b9B9khIzhYXqkNjM",
         "isFallback": false,
-        "gip": true,
-        "head": [
-          ["meta", { "charSet": "utf-8" }],
-          ["meta", { "name": "viewport", "content": "width=device-width" }]
-        ]
+        "gip": true
       }
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-4bf92a23c2c54952e242.js"
+      src="/_next/static/chunks/polyfills-af28de04c604a2479390.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-79d6d556cd81f503698e.js"
+      src="/_next/static/chunks/main-d2c3a87faf79060c4e10.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js"
+      src="/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/framework.aa73b1c70e7f3e2c7893.js"
+      src="/_next/static/chunks/framework.dc46d8e6c07122d5fb16.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a36a385313236c59b19.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-9a0b9e10c258d464b37e.js"
+      src="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-409b283987ce588fe3ab.js"
+      src="/_next/static/chunks/pages/link-7faf09bd68ceb178eba4.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Iqu4tXbd5_HMptfd1yVIE/_buildManifest.js"
+      src="/_next/static/42UB7b9B9khIzhYXqkNjM/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Iqu4tXbd5_HMptfd1yVIE/_ssgManifest.js"
+      src="/_next/static/42UB7b9B9khIzhYXqkNjM/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -3,35 +3,36 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
-    <noscript data-n-css="true"></noscript>
+    <meta name="next-head-count" content="2" />
+    <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-79d6d556cd81f503698e.js"
+      href="/_next/static/chunks/main-d2c3a87faf79060c4e10.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js"
+      href="/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/framework.aa73b1c70e7f3e2c7893.js"
+      href="/_next/static/chunks/framework.dc46d8e6c07122d5fb16.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a36a385313236c59b19.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-9a0b9e10c258d464b37e.js"
+      href="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/withRouter-7532e31ac7fbedf2c13d.js"
+      href="/_next/static/chunks/pages/withRouter-a26671519f5f31515826.js"
       as="script"
     />
   </head>
@@ -42,49 +43,45 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "Iqu4tXbd5_HMptfd1yVIE",
+        "buildId": "42UB7b9B9khIzhYXqkNjM",
         "isFallback": false,
-        "gip": true,
-        "head": [
-          ["meta", { "charSet": "utf-8" }],
-          ["meta", { "name": "viewport", "content": "width=device-width" }]
-        ]
+        "gip": true
       }
     </script>
     <script
       nomodule=""
-      src="/_next/static/chunks/polyfills-4bf92a23c2c54952e242.js"
+      src="/_next/static/chunks/polyfills-af28de04c604a2479390.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-79d6d556cd81f503698e.js"
+      src="/_next/static/chunks/main-d2c3a87faf79060c4e10.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/webpack-e067438c4cf4ef2ef178.js"
+      src="/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/framework.aa73b1c70e7f3e2c7893.js"
+      src="/_next/static/chunks/framework.dc46d8e6c07122d5fb16.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4a36a385313236c59b19.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c28076628b4c23f838ed.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-9a0b9e10c258d464b37e.js"
+      src="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/withRouter-7532e31ac7fbedf2c13d.js"
+      src="/_next/static/chunks/pages/withRouter-a26671519f5f31515826.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Iqu4tXbd5_HMptfd1yVIE/_buildManifest.js"
+      src="/_next/static/42UB7b9B9khIzhYXqkNjM/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Iqu4tXbd5_HMptfd1yVIE/_ssgManifest.js"
+      src="/_next/static/42UB7b9B9khIzhYXqkNjM/_ssgManifest.js"
       async=""
     ></script>
   </body>

Please sign in to comment.