-
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 isPreview field to router #21638
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
timneutkens
reviewed
Jan 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to cover client-side navigation. E.g. when you disable preview mode it'll still be enabled on an active tab when navigating between pages that use getStaticProps/getServerSideProps.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
buildDuration | 9.6s | 9.9s | |
nodeModulesSize | 75.3 MB | 75.3 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.923 | 1.93 | |
/ avg req/sec | 1300.37 | 1295.23 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.171 | 1.206 | |
/error-in-render avg req/sec | 2135.16 | 2072.62 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
677f882d2ed8..49c4.js gzip | 13.1 kB | 13.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.65 kB | |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
index.html gzip | 615 B | 616 B | |
link.html gzip | 620 B | 623 B | |
withRouter.html gzip | 608 B | 610 B | |
Overall change | 1.84 kB | 1.85 kB |
Diffs
Diff for 677f882d2ed8..abf803634.js
@@ -1563,7 +1563,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
locale = _ref.locale,
locales = _ref.locales,
defaultLocale = _ref.defaultLocale,
- domainLocales = _ref.domainLocales;
+ domainLocales = _ref.domainLocales,
+ isPreview = _ref.isPreview;
_classCallCheck(this, Router);
@@ -1589,6 +1590,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.defaultLocale = void 0;
this.domainLocales = void 0;
this.isReady = void 0;
+ this.isPreview = void 0;
this._idx = 0;
this.onPopState = function(e) {
@@ -1715,6 +1717,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
self.__NEXT_DATA__.gip ||
(!autoExportDynamic && !self.location.search)
);
+ this.isPreview = !!isPreview;
if (false) {
}
@@ -2231,7 +2234,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
(__N_SSP = _routeInfo.__N_SSP); // handle redirect on client-transition
if (!((__N_SSG || __N_SSP) && props)) {
- _context.next = 108;
+ _context.next = 109;
break;
}
@@ -2281,27 +2284,29 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
);
case 95:
+ this.isPreview = !!props.__N_PREVIEW; // handle SSG data 404
+
if (!(props.notFound === SSG_DATA_NOT_FOUND)) {
- _context.next = 108;
+ _context.next = 109;
break;
}
- _context.prev = 96;
- _context.next = 99;
+ _context.prev = 97;
+ _context.next = 100;
return this.fetchComponent("/404");
- case 99:
+ case 100:
notFoundRoute = "/404";
- _context.next = 105;
+ _context.next = 106;
break;
- case 102:
- _context.prev = 102;
- _context.t1 = _context["catch"](96);
+ case 103:
+ _context.prev = 103;
+ _context.t1 = _context["catch"](97);
notFoundRoute = "/_error";
- case 105:
- _context.next = 107;
+ case 106:
+ _context.next = 108;
return this.getRouteInfo(
notFoundRoute,
notFoundRoute,
@@ -2313,10 +2318,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
}
);
- case 107:
+ case 108:
routeInfo = _context.sent;
- case 108:
+ case 109:
Router.events.emit(
"beforeHistoryChange",
as,
@@ -2329,7 +2334,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
isValidShallowRoute =
options.shallow && this.route === route;
- _context.next = 114;
+ _context.next = 115;
return this.set(
route,
pathname,
@@ -2348,9 +2353,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
else throw e;
});
- case 114:
+ case 115:
if (!error) {
- _context.next = 117;
+ _context.next = 118;
break;
}
@@ -2362,7 +2367,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
);
throw error;
- case 117:
+ case 118:
if (false) {
}
@@ -2373,21 +2378,21 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
);
return _context.abrupt("return", true);
- case 122:
- _context.prev = 122;
+ case 123:
+ _context.prev = 123;
_context.t2 = _context["catch"](79);
if (!_context.t2.cancelled) {
- _context.next = 126;
+ _context.next = 127;
break;
}
return _context.abrupt("return", false);
- case 126:
+ case 127:
throw _context.t2;
- case 127:
+ case 128:
case "end":
return _context.stop();
}
@@ -2397,8 +2402,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this,
[
[36, 46],
- [79, 122],
- [96, 102]
+ [79, 123],
+ [97, 103]
]
);
})
@@ -3119,7 +3124,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _URL = new URL(dataHref, window.location.href),
cacheKey = _URL.href;
- if (true && this.sdc[cacheKey]) {
+ if (true && !this.isPreview && this.sdc[cacheKey]) {
return Promise.resolve(this.sdc[cacheKey]);
}
@@ -4430,7 +4435,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
"locale",
"locales",
"defaultLocale",
- "isReady"
+ "isReady",
+ "isPreview"
];
var routerEvents = [
"routeChangeStart",
Diff for main-HASH.js
@@ -373,7 +373,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
isFallback = data.isFallback,
locale = data.locale,
locales = data.locales,
- domainLocales = data.domainLocales;
+ domainLocales = data.domainLocales,
+ isPreview = data.isPreview;
var defaultLocale = data.defaultLocale;
var prefix = assetPrefix || ""; // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time
// So, this is how we do it in the client side at runtime
@@ -731,7 +732,8 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
locale: locale,
locales: locales,
defaultLocale: defaultLocale,
- domainLocales: domainLocales
+ domainLocales: domainLocales,
+ isPreview: isPreview
}
); // call init-client middleware
Diff for index.html
@@ -7,7 +7,7 @@
<noscript data-n-css=""></noscript>
<link
rel="preload"
- href="/_next/static/chunks/main-023c025701ff0cdae7c7.js"
+ href="/_next/static/chunks/main-226d7f95699e88b8198b.js"
as="script"
/>
<link
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c703037e67abf803634.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0c7c719218480065cb12.js"
as="script"
/>
<link
@@ -53,7 +53,7 @@
src="/_next/static/chunks/polyfills-7cd0807c85ae48513b2d.js"
></script>
<script
- src="/_next/static/chunks/main-023c025701ff0cdae7c7.js"
+ src="/_next/static/chunks/main-226d7f95699e88b8198b.js"
async=""
></script>
<script
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c703037e67abf803634.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0c7c719218480065cb12.js"
async=""
></script>
<script
Diff for link.html
@@ -7,7 +7,7 @@
<noscript data-n-css=""></noscript>
<link
rel="preload"
- href="/_next/static/chunks/main-023c025701ff0cdae7c7.js"
+ href="/_next/static/chunks/main-226d7f95699e88b8198b.js"
as="script"
/>
<link
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c703037e67abf803634.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0c7c719218480065cb12.js"
as="script"
/>
<link
@@ -58,7 +58,7 @@
src="/_next/static/chunks/polyfills-7cd0807c85ae48513b2d.js"
></script>
<script
- src="/_next/static/chunks/main-023c025701ff0cdae7c7.js"
+ src="/_next/static/chunks/main-226d7f95699e88b8198b.js"
async=""
></script>
<script
@@ -70,7 +70,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c703037e67abf803634.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0c7c719218480065cb12.js"
async=""
></script>
<script
Diff for withRouter.html
@@ -7,7 +7,7 @@
<noscript data-n-css=""></noscript>
<link
rel="preload"
- href="/_next/static/chunks/main-023c025701ff0cdae7c7.js"
+ href="/_next/static/chunks/main-226d7f95699e88b8198b.js"
as="script"
/>
<link
@@ -22,7 +22,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c703037e67abf803634.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0c7c719218480065cb12.js"
as="script"
/>
<link
@@ -53,7 +53,7 @@
src="/_next/static/chunks/polyfills-7cd0807c85ae48513b2d.js"
></script>
<script
- src="/_next/static/chunks/main-023c025701ff0cdae7c7.js"
+ src="/_next/static/chunks/main-226d7f95699e88b8198b.js"
async=""
></script>
<script
@@ -65,7 +65,7 @@
async=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c703037e67abf803634.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.0c7c719218480065cb12.js"
async=""
></script>
<script
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
buildDuration | 11.4s | 11.3s | -36ms |
nodeModulesSize | 75.3 MB | 75.3 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
677f882d2ed8..49c4.js gzip | 13.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.63 kB | 6.65 kB | |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..c711.js gzip | N/A | 13.1 kB | N/A |
Overall change | 59.5 kB | 59.5 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_error.js | 1 MB | 1 MB | |
404.html | 2.67 kB | 2.67 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1 MB | 1.01 MB | |
link.js | 1.06 MB | 1.06 MB | |
routerDirect.js | 1.06 MB | 1.06 MB | |
withRouter.js | 1.06 MB | 1.06 MB | |
Overall change | 5.19 MB | 5.19 MB |
Webpack 5 Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
buildDuration | 11.5s | 11.7s | |
nodeModulesSize | 75.3 MB | 75.3 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.93 | 1.935 | |
/ avg req/sec | 1295.52 | 1292.09 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.222 | 1.198 | -0.02 |
/error-in-render avg req/sec | 2046.01 | 2086.77 | +40.76 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
597-6c246419..806f.js gzip | 13 kB | 13.1 kB | |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 6.58 kB | 6.6 kB | |
webpack-HASH.js gzip | 954 B | 954 B | ✓ |
Overall change | 59.9 kB | 59.9 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_app-6e0a903..b885.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-7a100..a392.js gzip | 3.38 kB | 3.38 kB | ✓ |
hooks-f7e199..11b9.js gzip | 904 B | 904 B | ✓ |
index-3dc22c..ffbb.js gzip | 232 B | 232 B | ✓ |
link-c010d28..b60a.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..323a.js gzip | 308 B | 308 B | ✓ |
withRouter-a..2ef8.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.02 kB | 8.02 kB | ✓ |
Client Build Manifests
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
_buildManifest.js gzip | 299 B | 299 B | ✓ |
Overall change | 299 B | 299 B | ✓ |
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary | ijjk/next.js add/router-preview-field | Change | |
---|---|---|---|
index.html gzip | 584 B | 586 B | |
link.html gzip | 591 B | 594 B | |
withRouter.html gzip | 578 B | 580 B | |
Overall change | 1.75 kB | 1.76 kB |
Diffs
Diff for 677f882d2ed8..dc0f149c4.js
@@ -162,22 +162,22 @@
o = t.protocol || "",
i = t.pathname || "",
u = t.hash || "",
- c = t.query || "",
- s = !1;
+ s = t.query || "",
+ c = !1;
(e = e ? encodeURIComponent(e).replace(/%3A/i, ":") + "@" : ""),
t.host
- ? (s = e + t.host)
+ ? (c = e + t.host)
: r &&
- ((s = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
- t.port && (s += ":" + t.port));
- c &&
- "object" === typeof c &&
- (c = String(n.urlQueryToSearchParams(c)));
- var l = t.search || (c && "?".concat(c)) || "";
+ ((c = e + (~r.indexOf(":") ? "[".concat(r, "]") : r)),
+ t.port && (c += ":" + t.port));
+ s &&
+ "object" === typeof s &&
+ (s = String(n.urlQueryToSearchParams(s)));
+ var l = t.search || (s && "?".concat(s)) || "";
o && ":" !== o.substr(-1) && (o += ":");
- t.slashes || ((!o || a.test(o)) && !1 !== s)
- ? ((s = "//" + (s || "")), i && "/" !== i[0] && (i = "/" + i))
- : s || (s = "");
+ t.slashes || ((!o || a.test(o)) && !1 !== c)
+ ? ((c = "//" + (c || "")), i && "/" !== i[0] && (i = "/" + i))
+ : c || (c = "");
u && "#" !== u[0] && (u = "#" + u);
l && "?" !== l[0] && (l = "?" + l);
return (
@@ -185,7 +185,7 @@
(l = l.replace("#", "%23")),
""
.concat(o)
- .concat(s)
+ .concat(c)
.concat(i)
.concat(l)
.concat(u)
@@ -266,7 +266,7 @@
(e.default = void 0);
i(r("Lab5"));
var u = i(r("0G5g"));
- function c(t, e, r) {
+ function s(t, e, r) {
var n,
o = e.get(t);
if (o) return "future" in o ? o.future : Promise.resolve(o);
@@ -282,7 +282,7 @@
: a
);
}
- var s = (function(t) {
+ var c = (function(t) {
try {
return (
(t = document.createElement("link")),
@@ -390,7 +390,7 @@
}
return {
whenEntrypoint: function(t) {
- return c(t, e);
+ return s(t, e);
},
onEntrypoint: function(t, r) {
Promise.resolve(r)
@@ -412,12 +412,12 @@
},
loadRoute: function(r) {
var i = this;
- return c(
+ return s(
r,
l,
a(
n.mark(function a() {
- var u, c, s, l, y, m, g, w;
+ var u, s, c, l, y, m, g, w;
return n.wrap(
function(n) {
for (;;)
@@ -427,12 +427,12 @@
case 3:
return (
(u = n.sent),
- (c = u.scripts),
- (s = u.css),
+ (s = u.scripts),
+ (c = u.css),
(n.next = 8),
Promise.all([
- e.has(r) ? [] : Promise.all(c.map(p)),
- Promise.all(s.map(v))
+ e.has(r) ? [] : Promise.all(s.map(p)),
+ Promise.all(c.map(v))
])
);
case 8:
@@ -489,7 +489,7 @@
: d(t, e)
.then(function(t) {
return Promise.all(
- s
+ c
? t.scripts.map(function(t) {
return (
(e = t),
@@ -721,8 +721,8 @@
(e.interpolateAs = R),
(e.resolveHref = O),
(e.default = void 0);
- var c = r("X24+"),
- s = r("Nh2W"),
+ var s = r("X24+"),
+ c = r("Nh2W"),
l = r("wkBG"),
f = (r("3wub"), g(r("dZ6Y"))),
h = r("g/15"),
@@ -755,7 +755,7 @@
return (function(t, e) {
return e && t.startsWith("/")
? "/" === t
- ? (0, c.normalizePathTrailingSlash)(e)
+ ? (0, s.normalizePathTrailingSlash)(e)
: "".concat(e).concat("/" === x(t) ? t.substring(1) : t)
: t;
})(t, "");
@@ -788,14 +788,14 @@
r = a[t],
o = r.repeat,
u = r.optional,
- c = "[".concat(o ? "..." : "").concat(t, "]");
+ s = "[".concat(o ? "..." : "").concat(t, "]");
return (
- u && (c = "".concat(e ? "" : "/", "[").concat(c, "]")),
+ u && (s = "".concat(e ? "" : "/", "[").concat(s, "]")),
o && !Array.isArray(e) && (e = [e]),
(u || t in i) &&
(n =
n.replace(
- c,
+ s,
o
? e
.map(function(t) {
@@ -824,13 +824,13 @@
if (!E(o)) return r ? [o] : o;
try {
var a = new URL(o, n);
- a.pathname = (0, c.normalizePathTrailingSlash)(a.pathname);
+ a.pathname = (0, s.normalizePathTrailingSlash)(a.pathname);
var i = "";
if ((0, p.isDynamicRoute)(a.pathname) && a.searchParams && r) {
var u = (0, v.searchParamsToUrlQuery)(a.searchParams),
- s = R(a.pathname, a.pathname, u),
- l = s.result,
- f = s.params;
+ c = R(a.pathname, a.pathname, u),
+ l = c.result,
+ f = c.params;
l &&
(i = (0, h.formatWithValidation)({
pathname: l,
@@ -854,11 +854,11 @@
o = u(n, 2),
a = o[0],
i = o[1],
- c = (0, h.getLocationOrigin)(),
- s = a.startsWith(c),
- l = i && i.startsWith(c);
+ s = (0, h.getLocationOrigin)(),
+ c = a.startsWith(s),
+ l = i && i.startsWith(s);
(a = C(a)), (i = i ? C(i) : i);
- var f = s ? a : S(a),
+ var f = c ? a : S(a),
p = r ? C(O(t.pathname, r)) : i || a;
return { url: f, as: l ? p : S(p) };
}
@@ -879,22 +879,22 @@
}
function A(t, e) {
return I(t, e ? 3 : 1).catch(function(t) {
- throw (e || (0, s.markAssetError)(t), t);
+ throw (e || (0, c.markAssetError)(t), t);
});
}
var M = (function() {
function t(e, r, n, o) {
var i = this,
u = o.initialProps,
- s = o.pageLoader,
+ c = o.pageLoader,
l = o.App,
f = o.wrapApp,
v = o.Component,
y = o.err,
m = o.subscription,
g = o.isFallback,
- w = o.locale;
- o.locales, o.defaultLocale, o.domainLocales;
+ w = o.locale,
+ b = (o.locales, o.defaultLocale, o.domainLocales, o.isPreview);
a(this, t),
(this.route = void 0),
(this.pathname = void 0),
@@ -918,6 +918,7 @@
(this.defaultLocale = void 0),
(this.domainLocales = void 0),
(this.isReady = void 0),
+ (this.isPreview = void 0),
(this._idx = 0),
(this.onPopState = function(t) {
var e = t.state;
@@ -943,16 +944,16 @@
);
}
} else {
- var c = i.pathname,
- s = i.query;
+ var s = i.pathname,
+ c = i.query;
i.changeState(
"replaceState",
- (0, h.formatWithValidation)({ pathname: S(c), query: s }),
+ (0, h.formatWithValidation)({ pathname: S(s), query: c }),
(0, h.getURL)()
);
}
}),
- (this.route = (0, c.removePathTrailingSlash)(e)),
+ (this.route = (0, s.removePathTrailingSlash)(e)),
(this.components = {}),
"/_error" !== e &&
(this.components[this.route] = {
@@ -965,11 +966,11 @@
}),
(this.components["/_app"] = { Component: l, styleSheets: [] }),
(this.events = t.events),
- (this.pageLoader = s),
+ (this.pageLoader = c),
(this.pathname = e),
(this.query = r);
- var b = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
- (this.asPath = b ? e : n),
+ var _ = (0, p.isDynamicRoute)(e) && self.__NEXT_DATA__.autoExport;
+ (this.asPath = _ ? e : n),
(this.basePath = ""),
(this.sub = m),
(this.clc = null),
@@ -979,8 +980,9 @@
(this.isReady = !(
!self.__NEXT_DATA__.gssp &&
!self.__NEXT_DATA__.gip &&
- (b || self.location.search)
+ (_ || self.location.search)
)),
+ (this.isPreview = !!b),
"//" !== n.substr(0, 2) &&
this.changeState(
"replaceState",
@@ -1134,7 +1136,7 @@
return (
(A = e.sent),
(e.next = 42),
- (0, s.getClientBuildManifest)()
+ (0, c.getClientBuildManifest)()
);
case 42:
(M = e.sent), M.__rewrites, (e.next = 50);
@@ -1152,10 +1154,10 @@
((C = x.pathname),
(o = (0, h.formatWithValidation)(x))),
(C = C
- ? (0, c.removePathTrailingSlash)(k(C))
+ ? (0, s.removePathTrailingSlash)(k(C))
: C),
this.urlIsNew(w) || f || (r = "replaceState"),
- (D = (0, c.removePathTrailingSlash)(C)),
+ (D = (0, s.removePathTrailingSlash)(C)),
(N = a),
E(a))
) {
@@ -1251,7 +1253,7 @@
(Y = X.__N_SSP),
(!$ && !Y) || !J)
) {
- e.next = 108;
+ e.next = 109;
break;
}
if (!J.pageProps || !J.pageProps.__N_REDIRECT) {
@@ -1284,37 +1286,40 @@
e.abrupt("return", new Promise(function() {}))
);
case 95:
- if (J.notFound !== T) {
- e.next = 108;
+ if (
+ ((this.isPreview = !!J.__N_PREVIEW),
+ J.notFound !== T)
+ ) {
+ e.next = 109;
break;
}
return (
- (e.prev = 96),
- (e.next = 99),
+ (e.prev = 97),
+ (e.next = 100),
this.fetchComponent("/404")
);
- case 99:
- (rt = "/404"), (e.next = 105);
+ case 100:
+ (rt = "/404"), (e.next = 106);
break;
- case 102:
- (e.prev = 102),
- (e.t1 = e.catch(96)),
+ case 103:
+ (e.prev = 103),
+ (e.t1 = e.catch(97)),
(rt = "/_error");
- case 105:
+ case 106:
return (
- (e.next = 107),
+ (e.next = 108),
this.getRouteInfo(rt, rt, I, a, N, {
shallow: !1
})
);
- case 107:
- V = e.sent;
case 108:
+ V = e.sent;
+ case 109:
return (
t.events.emit("beforeHistoryChange", a, g),
this.changeState(r, o, a, i),
(nt = i.shallow && this.route === D),
- (e.next = 114),
+ (e.next = 115),
this.set(
D,
C,
@@ -1327,31 +1332,31 @@
z = z || t;
})
);
- case 114:
+ case 115:
if (!z) {
- e.next = 117;
+ e.next = 118;
break;
}
throw (t.events.emit("routeChangeError", z, w, g),
z);
- case 117:
+ case 118:
return (
t.events.emit("routeChangeComplete", a, g),
e.abrupt("return", !0)
);
- case 122:
+ case 123:
if (
- ((e.prev = 122),
+ ((e.prev = 123),
(e.t2 = e.catch(79)),
!e.t2.cancelled)
) {
- e.next = 126;
+ e.next = 127;
break;
}
return e.abrupt("return", !1);
- case 126:
- throw e.t2;
case 127:
+ throw e.t2;
+ case 128:
case "end":
return e.stop();
}
@@ -1360,8 +1365,8 @@
this,
[
[36, 46],
- [79, 122],
- [96, 102]
+ [79, 123],
+ [97, 103]
]
);
})
@@ -1398,7 +1403,7 @@
key: "handleRouteInfoError",
value: (function() {
var e = o(
- n.mark(function e(r, o, a, i, u, c) {
+ n.mark(function e(r, o, a, i, u, s) {
var l, f, h, p;
return n.wrap(
function(e) {
@@ -1411,7 +1416,7 @@
}
throw r;
case 2:
- if (!(0, s.isAssetError)(r) && !c) {
+ if (!(0, c.isAssetError)(r) && !s) {
e.next = 6;
break;
}
@@ -1507,8 +1512,8 @@
value: (function() {
var t = o(
n.mark(function t(e, r, o, a, i, u) {
- var c,
- s,
+ var s,
+ c,
l,
f,
p,
@@ -1523,19 +1528,19 @@
case 0:
if (
((t.prev = 0),
- (c = this.components[e]),
- !u.shallow || !c || this.route !== e)
+ (s = this.components[e]),
+ !u.shallow || !s || this.route !== e)
) {
t.next = 4;
break;
}
- return t.abrupt("return", c);
+ return t.abrupt("return", s);
case 4:
- if (!(s = c && "initial" in c ? void 0 : c)) {
+ if (!(c = s && "initial" in s ? void 0 : s)) {
t.next = 9;
break;
}
- (t.t0 = s), (t.next = 12);
+ (t.t0 = c), (t.next = 12);
break;
case 9:
return (
@@ -1644,9 +1649,9 @@
o = r[1],
a = t.split("#"),
i = u(a, 2),
- c = i[0],
- s = i[1];
- return !(!s || n !== c || o !== s) || (n === c && o !== s);
+ s = i[0],
+ c = i[1];
+ return !(!c || n !== s || o !== c) || (n === s && o !== c);
}
},
{
@@ -1677,7 +1682,7 @@
!(arguments.length > 2 && void 0 !== arguments[2]) ||
arguments[2],
n = t.pathname,
- o = (0, c.removePathTrailingSlash)(
+ o = (0, s.removePathTrailingSlash)(
(0, l.denormalizePagePath)(r ? k(n) : n)
);
return (
@@ -1691,7 +1696,7 @@
)
return (t.pathname = r ? S(e) : e), !0;
}),
- (t.pathname = (0, c.removePathTrailingSlash)(t.pathname))),
+ (t.pathname = (0, s.removePathTrailingSlash)(t.pathname))),
t
);
}
@@ -1706,7 +1711,7 @@
a,
i,
u,
- s,
+ c,
l = this,
f = arguments;
return n.wrap(
@@ -1734,7 +1739,7 @@
break;
case 12:
return (
- (s = (0, c.removePathTrailingSlash)(i)),
+ (c = (0, s.removePathTrailingSlash)(i)),
(t.next = 15),
Promise.all([
this.pageLoader._isSsg(e).then(function(t) {
@@ -1754,7 +1759,7 @@
}),
this.pageLoader[
o.priority ? "loadPage" : "prefetch"
- ](s)
+ ](c)
])
);
case 15:
@@ -1848,7 +1853,7 @@
value: function(t) {
var e = this,
r = new URL(t, window.location.href).href;
- return this.sdc[r]
+ return !this.isPreview && this.sdc[r]
? Promise.resolve(this.sdc[r])
: A(t, this.isSsr).then(function(t) {
return (e.sdc[r] = t), t;
@@ -1917,8 +1922,8 @@
return t.substring(e.length);
}),
(e.getDisplayName = u),
- (e.isResSent = c),
- (e.loadGetInitialProps = s),
+ (e.isResSent = s),
+ (e.loadGetInitialProps = c),
(e.formatWithValidation = function(t) {
0;
return (0, a.formatUrl)(t);
@@ -1938,10 +1943,10 @@
function u(t) {
return "string" === typeof t ? t : t.displayName || t.name || "Unknown";
}
- function c(t) {
+ function s(t) {
return t.finished || t.headersSent;
}
- function s(t, e) {
+ function c(t, e) {
return l.apply(this, arguments);
}
function l() {
@@ -1965,7 +1970,7 @@
t.next = 11;
break;
}
- return (t.next = 9), s(r.Component, r.ctx);
+ return (t.next = 9), c(r.Component, r.ctx);
case 9:
return (
(t.t0 = t.sent), t.abrupt("return", { pageProps: t.t0 })
@@ -1975,7 +1980,7 @@
case 12:
return (t.next = 14), e.getInitialProps(r);
case 14:
- if (((a = t.sent), !o || !c(o))) {
+ if (((a = t.sent), !o || !s(o))) {
t.next = 17;
break;
}
@@ -2068,8 +2073,8 @@
a = e ? new URL(e, r) : r,
i = new URL(t, a),
u = i.pathname,
- c = i.searchParams,
- s = i.search,
+ s = i.searchParams,
+ c = i.search,
l = i.hash,
f = i.href;
if (i.origin !== r.origin)
@@ -2078,8 +2083,8 @@
);
return {
pathname: u,
- query: (0, o.searchParamsToUrlQuery)(c),
- search: s,
+ query: (0, o.searchParamsToUrlQuery)(s),
+ search: c,
hash: l,
href: f.slice(r.origin.length)
};
@@ -2097,7 +2102,7 @@
a = o.iterator || "@@iterator",
i = o.asyncIterator || "@@asyncIterator",
u = o.toStringTag || "@@toStringTag";
- function c(t, e, r) {
+ function s(t, e, r) {
return (
Object.defineProperty(t, e, {
value: r,
@@ -2109,13 +2114,13 @@
);
}
try {
- c({}, "");
+ s({}, "");
} catch (j) {
- c = function(t, e, r) {
+ s = function(t, e, r) {
return (t[e] = r);
};
}
- function s(t, e, r, n) {
+ function c(t, e, r, n) {
var o = e && e.prototype instanceof y ? e : y,
a = Object.create(o.prototype),
i = new L(n || []);
@@ -2143,13 +2148,13 @@
r.dispatchException(r.arg);
} else "return" === r.method && r.abrupt("return", r.arg);
n = p;
- var c = l(t, e, r);
- if ("normal" === c.type) {
- if (((n = r.done ? d : h), c.arg === v)) continue;
- return { value: c.arg, done: r.done };
+ var s = l(t, e, r);
+ if ("normal" === s.type) {
+ if (((n = r.done ? d : h), s.arg === v)) continue;
+ return { value: s.arg, done: r.done };
}
- "throw" === c.type &&
- ((n = d), (r.method = "throw"), (r.arg = c.arg));
+ "throw" === s.type &&
+ ((n = d), (r.method = "throw"), (r.arg = s.arg));
}
};
})(t, r, i)),
@@ -2163,7 +2168,7 @@
return { type: "throw", arg: j };
}
}
- t.wrap = s;
+ t.wrap = c;
var f = "suspendedStart",
h = "suspendedYield",
p = "executing",
@@ -2182,17 +2187,17 @@
var x = (g.prototype = y.prototype = Object.create(w));
function P(t) {
["next", "throw", "return"].forEach(function(e) {
- c(t, e, function(t) {
+ s(t, e, function(t) {
return this._invoke(e, t);
});
});
}
function S(t, e) {
function r(o, a, i, u) {
- var c = l(t[o], t, a);
- if ("throw" !== c.type) {
- var s = c.arg,
- f = s.value;
+ var s = l(t[o], t, a);
+ if ("throw" !== s.type) {
+ var c = s.arg,
+ f = c.value;
return f && "object" === typeof f && n.call(f, "__await")
? e.resolve(f.__await).then(
function(t) {
@@ -2204,14 +2209,14 @@
)
: e.resolve(f).then(
function(t) {
- (s.value = t), i(s);
+ (c.value = t), i(c);
},
function(t) {
return r("throw", t, i, u);
}
);
}
- u(c.arg);
+ u(s.arg);
}
var o;
this._invoke = function(t, n) {
@@ -2299,7 +2304,7 @@
return (
(m.prototype = x.constructor = g),
(g.constructor = m),
- (m.displayName = c(g, u, "GeneratorFunction")),
+ (m.displayName = s(g, u, "GeneratorFunction")),
(t.isGeneratorFunction = function(t) {
var e = "function" === typeof t && t.constructor;
return (
@@ -2311,7 +2316,7 @@
return (
Object.setPrototypeOf
? Object.setPrototypeOf(t, g)
- : ((t.__proto__ = g), c(t, u, "GeneratorFunction")),
+ : ((t.__proto__ = g), s(t, u, "GeneratorFunction")),
(t.prototype = Object.create(x)),
t
);
@@ -2326,7 +2331,7 @@
(t.AsyncIterator = S),
(t.async = function(e, r, n, o, a) {
void 0 === a && (a = Promise);
- var i = new S(s(e, r, n, o), a);
+ var i = new S(c(e, r, n, o), a);
return t.isGeneratorFunction(r)
? i
: i.next().then(function(t) {
@@ -2334,7 +2339,7 @@
});
}),
P(x),
- c(x, u, "Generator"),
+ s(x, u, "Generator"),
(x[a] = function() {
return this;
}),
@@ -2399,15 +2404,15 @@
u = i.completion;
if ("root" === i.tryLoc) return o("end");
if (i.tryLoc <= this.prev) {
- var c = n.call(i, "catchLoc"),
- s = n.call(i, "finallyLoc");
- if (c && s) {
+ var s = n.call(i, "catchLoc"),
+ c = n.call(i, "finallyLoc");
+ if (s && c) {
if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
if (this.prev < i.finallyLoc) return o(i.finallyLoc);
- } else if (c) {
+ } else if (s) {
if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
} else {
- if (!s)
+ if (!c)
throw new Error("try statement without catch or finally");
if (this.prev < i.finallyLoc) return o(i.finallyLoc);
}
@@ -2511,8 +2516,8 @@
(r.push(i.value), !e || r.length !== e);
n = !0
);
- } catch (c) {
- (o = !0), (a = c);
+ } catch (s) {
+ (o = !0), (a = s);
} finally {
try {
n || null == u.return || u.return();
@@ -2568,7 +2573,7 @@
}
var i,
u = !0,
- c = !1;
+ s = !1;
return {
s: function() {
r = t[Symbol.iterator]();
@@ -2578,13 +2583,13 @@
return (u = t.done), t;
},
e: function(t) {
- (c = !0), (i = t);
+ (s = !0), (i = t);
},
f: function() {
try {
u || null == r.return || r.return();
} finally {
- if (c) throw i;
+ if (s) throw i;
}
}
};
@@ -2598,7 +2603,7 @@
u = r("TqRt");
(e.__esModule = !0),
(e.useRouter = function() {
- return c.default.useContext(l.RouterContext);
+ return s.default.useContext(l.RouterContext);
}),
(e.makePublicRouterInstance = function(t) {
var e,
@@ -2618,7 +2623,7 @@
a.f();
}
return (
- (n.events = s.default.events),
+ (n.events = c.default.events),
d.forEach(function(t) {
n[t] = function() {
return r[t].apply(r, arguments);
@@ -2628,9 +2633,9 @@
);
}),
(e.createRouter = e.withRouter = e.default = void 0);
- var c = u(r("q1tI")),
- s = i(r("elyg"));
- (e.Router = s.default), (e.NextRouter = s.NextRouter);
+ var s = u(r("q1tI")),
+ c = i(r("elyg"));
+ (e.Router = c.default), (e.NextRouter = c.NextRouter);
var l = r("qOIg"),
f = u(r("0Bsm"));
e.withRouter = f.default;
@@ -2653,7 +2658,8 @@
"locale",
"locales",
"defaultLocale",
- "isReady"
+ "isReady",
+ "isPreview"
],
d = ["push", "replace", "reload", "back", "prefetch", "beforePopState"];
function v() {
@@ -2666,7 +2672,7 @@
}
Object.defineProperty(h, "events", {
get: function() {
- return s.default.events;
+ return c.default.events;
}
}),
p.forEach(function(t) {
@@ -2691,7 +2697,7 @@
"hashChangeComplete"
].forEach(function(t) {
h.ready(function() {
- s.default.events.on(t, function() {
+ c.default.events.on(t, function() {
var e = "on"
.concat(t.charAt(0).toUpperCase())
.concat(t.substring(1)),
@@ -2714,7 +2720,7 @@
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
e[r] = arguments[r];
return (
- (h.router = n(s.default, e)),
+ (h.router = n(c.default, e)),
h.readyCallbacks.forEach(function(t) {
return t();
}),
@@ -2784,11 +2790,11 @@
function r(t, e, r, n, o, a, i) {
try {
var u = t[a](i),
- c = u.value;
- } catch (s) {
- return void r(s);
+ s = u.value;
+ } catch (c) {
+ return void r(c);
}
- u.done ? e(c) : Promise.resolve(c).then(n, o);
+ u.done ? e(s) : Promise.resolve(s).then(n, o);
}
t.exports = function(t) {
return function() {
@@ -2797,10 +2803,10 @@
return new Promise(function(o, a) {
var i = t.apply(e, n);
function u(t) {
- r(i, o, a, u, c, "next", t);
+ r(i, o, a, u, s, "next", t);
}
- function c(t) {
- r(i, o, a, u, c, "throw", t);
+ function s(t) {
+ r(i, o, a, u, s, "throw", t);
}
u(void 0);
});
Diff for main-HASH.js
@@ -212,8 +212,8 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
var p = r("284h"),
d = r("TqRt");
(t.__esModule = !0),
- (t.render = oe),
- (t.renderError = ie),
+ (t.render = ae),
+ (t.renderError = ue),
(t.default = t.emitter = t.router = t.version = void 0);
var m = d(r("pVnL"));
d(r("284h"));
@@ -250,36 +250,37 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
q = A.locale,
H = A.locales,
X = A.domainLocales,
- G = A.defaultLocale,
- W = D || "";
- (r.p = "".concat(W, "/_next/")),
+ G = A.isPreview,
+ W = A.defaultLocale,
+ J = D || "";
+ (r.p = "".concat(J, "/_next/")),
E.setConfig({ serverRuntimeConfig: {}, publicRuntimeConfig: O || {} });
- var J = (0, x.getURL)();
- (0, S.hasBasePath)(J) && (J = (0, S.delBasePath)(J));
- var U = new P.default(I, W),
- Y = function(e) {
+ var U = (0, x.getURL)();
+ (0, S.hasBasePath)(U) && (U = (0, S.delBasePath)(U));
+ var Y = new P.default(I, J),
+ V = function(e) {
var t = l(e, 2),
r = t[0],
n = t[1];
- return U.routeLoader.onEntrypoint(r, n);
+ return Y.routeLoader.onEntrypoint(r, n);
};
window.__NEXT_P &&
window.__NEXT_P.map(function(e) {
return setTimeout(function() {
- return Y(e);
+ return V(e);
}, 0);
}),
(window.__NEXT_P = []),
- (window.__NEXT_P.push = Y);
- var V,
- z,
+ (window.__NEXT_P.push = V);
+ var z,
Q,
Z,
- K = (0, T.default)(),
- $ = document.getElementById("__next");
- t.router = z;
- var ee,
- te = (function(e) {
+ K,
+ $ = (0, T.default)(),
+ ee = document.getElementById("__next");
+ t.router = Q;
+ var te,
+ re = (function(e) {
u(r, e);
var t = f(r);
function r() {
@@ -297,22 +298,22 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
key: "componentDidMount",
value: function() {
this.scrollToHash(),
- z.isSsr &&
+ Q.isSsr &&
(B ||
(A.nextExport &&
- ((0, w.isDynamicRoute)(z.pathname) ||
+ ((0, w.isDynamicRoute)(Q.pathname) ||
location.search)) ||
(M && M.__N_SSG && location.search)) &&
- z.replace(
- z.pathname +
+ Q.replace(
+ Q.pathname +
"?" +
String(
_.assign(
- _.urlQueryToSearchParams(z.query),
+ _.urlQueryToSearchParams(Q.query),
new URLSearchParams(location.search)
)
),
- J,
+ U,
{ _h: 1, shallow: !B }
);
}
@@ -346,9 +347,9 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
r
);
})(h.default.Component),
- re = (0, g.default)();
- t.emitter = re;
- var ne = (function() {
+ ne = (0, g.default)();
+ t.emitter = ne;
+ var oe = (function() {
var e = o(
n.mark(function e() {
var r,
@@ -366,7 +367,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
return (
s.length > 0 && void 0 !== s[0] ? s[0] : {},
(e.next = 4),
- U.routeLoader.whenEntrypoint("/_app")
+ Y.routeLoader.whenEntrypoint("/_app")
);
case 4:
if (!("error" in (r = e.sent))) {
@@ -377,10 +378,10 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
case 7:
(o = r.component),
(a = r.exports),
- (Q = o),
+ (Z = o),
a &&
a.reportWebVitals &&
- (Z = function(e) {
+ (K = function(e) {
var t,
r = e.id,
n = e.name,
@@ -412,7 +413,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
(e.next = 16);
break;
case 16:
- return (e.next = 18), U.routeLoader.whenEntrypoint(R);
+ return (e.next = 18), Y.routeLoader.whenEntrypoint(R);
case 18:
e.t0 = e.sent;
case 19:
@@ -422,7 +423,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
}
throw u.error;
case 22:
- (ee = u.component), (e.next = 27);
+ (te = u.component), (e.next = 27);
break;
case 27:
e.next = 32;
@@ -437,39 +438,40 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
return (e.next = 36), window.__NEXT_PRELOADREADY(j);
case 36:
return (
- (t.router = z = (0, k.createRouter)(R, F, J, {
+ (t.router = Q = (0, k.createRouter)(R, F, U, {
initialProps: M,
- pageLoader: U,
- App: Q,
- Component: ee,
- wrapApp: de,
+ pageLoader: Y,
+ App: Z,
+ Component: te,
+ wrapApp: me,
err: i,
isFallback: Boolean(B),
subscription: function(e, t, r) {
- return oe(
+ return ae(
Object.assign({}, e, { App: t, scroll: r })
);
},
locale: q,
locales: H,
- defaultLocale: G,
- domainLocales: X
+ defaultLocale: W,
+ domainLocales: X,
+ isPreview: G
})),
- oe(
+ ae(
(c = {
- App: Q,
+ App: Z,
initial: !0,
- Component: ee,
+ Component: te,
props: M,
err: i
})
),
- e.abrupt("return", re)
+ e.abrupt("return", ne)
);
case 44:
return e.abrupt("return", {
- emitter: re,
- render: oe,
+ emitter: ne,
+ render: ae,
renderCtx: c
});
case 45:
@@ -487,11 +489,11 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
return e.apply(this, arguments);
};
})();
- function oe(e) {
- return ae.apply(this, arguments);
+ function ae(e) {
+ return ie.apply(this, arguments);
}
- function ae() {
- return (ae = o(
+ function ie() {
+ return (ie = o(
n.mark(function e(t) {
return n.wrap(
function(e) {
@@ -502,11 +504,11 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
e.next = 4;
break;
}
- return (e.next = 3), ie(t);
+ return (e.next = 3), ue(t);
case 3:
return e.abrupt("return");
case 4:
- return (e.prev = 4), (e.next = 7), me(t);
+ return (e.prev = 4), (e.next = 7), he(t);
case 7:
e.next = 16;
break;
@@ -520,7 +522,7 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
throw e.t0;
case 13:
return (
- (e.next = 16), ie((0, m.default)({}, t, { err: e.t0 }))
+ (e.next = 16), ue((0, m.default)({}, t, { err: e.t0 }))
);
case 16:
case "end":
@@ -534,25 +536,25 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
})
)).apply(this, arguments);
}
- function ie(e) {
+ function ue(e) {
var t = e.App,
r = e.err;
return (
console.error(r),
- U.loadPage("/_error").then(function(n) {
+ Y.loadPage("/_error").then(function(n) {
var o = n.page,
a = n.styleSheets,
- i = de(t),
+ i = me(t),
u = {
Component: o,
AppTree: i,
- router: z,
- ctx: { err: r, pathname: R, query: F, asPath: J, AppTree: i }
+ router: Q,
+ ctx: { err: r, pathname: R, query: F, asPath: U, AppTree: i }
};
return Promise.resolve(
e.props ? e.props : (0, x.loadGetInitialProps)(t, u)
).then(function(t) {
- return me(
+ return he(
(0, m.default)({}, e, {
err: r,
Component: o,
@@ -564,9 +566,9 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
})
);
}
- t.default = ne;
- var ue = "function" === typeof v.default.hydrate;
- function ce() {
+ t.default = oe;
+ var ce = "function" === typeof v.default.hydrate;
+ function se() {
x.ST &&
(performance.mark("afterHydrate"),
performance.measure(
@@ -579,10 +581,10 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
"beforeRender",
"afterHydrate"
),
- Z && performance.getEntriesByName("Next.js-hydration").forEach(Z),
- le());
+ K && performance.getEntriesByName("Next.js-hydration").forEach(K),
+ fe());
}
- function se() {
+ function le() {
if (x.ST) {
performance.mark("afterRender");
var e = performance.getEntriesByName("routeChange", "mark");
@@ -597,12 +599,12 @@ _N_E = (window.webpackJsonp_N_E = window.webpackJsonp_N_E || []).push([
"beforeRender",
"afterRender"
),
- Z &&
- (performance.getEntriesByName("Next.js-render").forEach(Z),
+ K &&
+ (performance.getEntriesByName("Next.js-render").forEach(K),
performance
.getEntriesByName("Next.js-route-change-to-render")
- .forEach(Z)),
- le(),
+ .forEach(K)),
+ fe(),
["Next.js-route-change-to-render", "Next.js-render"].forEach(
function(e) {
return performance.clearMeasures(e);
@@ -610,64 +612,
Post job cleanup.
[command]/usr/bin/git version
git version 2.30.0
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
Cleaning up orphan processes
Commit: 0fd26628120eb2258deb76faa96e808c79a71984
…w-field # Conflicts: # packages/next/client/router.ts # packages/next/next-server/lib/router/router.ts # packages/next/next-server/server/render.tsx # test/integration/build-output/test/index.test.js
This was referenced Mar 8, 2021
This was referenced Mar 15, 2021
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 an
isPreview
field to thenext/router
to allow detecting when in preview mode.Closes: #14903