-
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
Ignore history state not created by next.js #15379
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 11.9s | 11.6s | -329ms |
nodeModulesSize | 66.4 MB | 66.4 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.894 | 1.947 | |
/ avg req/sec | 1319.7 | 1284.25 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.136 | 1.137 | 0 |
/error-in-render avg req/sec | 2200.25 | 2198.37 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..5755.js gzip | 10.1 kB | 10.1 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-d8a3f1c..06ea.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
Overall change | 87.5 kB | 87.5 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.1 kB | 6.11 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-e63c4e5..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
index.html gzip | 948 B | 944 B | -4 B |
link.html gzip | 954 B | 950 B | -4 B |
withRouter.html gzip | 940 B | 936 B | -4 B |
Overall change | 2.84 kB | 2.83 kB | -12 B |
Diffs
Diff for 677f882d2ed8..4c1625eb6.js
@@ -867,7 +867,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _e$state = e.state,
url = _e$state.url,
as = _e$state.as,
- options = _e$state.options;
+ options = _e$state.options,
+ __N = _e$state.__N;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(url),
pathname = _ref2.pathname; // Make sure we don't re-render on initial load,
@@ -1325,7 +1331,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url: url,
as: as,
- options: options
+ options: options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for 677f882d2ed8..bf.module.js
@@ -725,7 +725,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return;
}
- var { url, as, options } = e.state;
+ var { url, as, options, __N } = e.state;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
+
var { pathname } = (0, _parseRelativeUrl.parseRelativeUrl)(url); // Make sure we don't re-render on initial load,
// can be caused by navigating back from an external site
@@ -1046,7 +1052,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url,
as,
- options
+ options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.47129aa59ae4c1625eb6.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c782d61d4ebb79869bb.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -122,13 +122,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.47129aa59ae4c1625eb6.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c782d61d4ebb79869bb.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.47129aa59ae4c1625eb6.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.4c782d61d4ebb79869bb.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 12.5s | 12.8s | |
nodeModulesSize | 66.4 MB | 66.4 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..5755.js gzip | 10.1 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-d8a3f1c..06ea.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..b670.js gzip | N/A | 10.1 kB | N/A |
Overall change | 87.5 kB | 87.5 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.1 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-e63c4e5..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.11 kB | N/A |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_error.js | 881 kB | 881 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.82 kB | 3.82 kB | ✓ |
index.js | 881 kB | 881 kB | ✓ |
link.js | 922 kB | 922 kB | |
routerDirect.js | 916 kB | 916 kB | |
withRouter.js | 916 kB | 916 kB | |
Overall change | 4.52 MB | 4.52 MB |
Failing test suitesCommit: 1ebba3a test/integration/build-output/test/index.test.js
Expand output● Build Output › Basic Application Output › should not deviate from snapshot
|
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 13s | 13.2s | |
nodeModulesSize | 66.4 MB | 66.4 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.083 | 2.04 | -0.04 |
/ avg req/sec | 1200.16 | 1225.56 | +25.4 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.236 | 1.29 | |
/error-in-render avg req/sec | 2022.36 | 1938.65 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..28cd.js gzip | 10.1 kB | 10.1 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
Overall change | 87.5 kB | 87.5 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.1 kB | 6.11 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
index.html gzip | 947 B | 945 B | -2 B |
link.html gzip | 952 B | 951 B | -1 B |
withRouter.html gzip | 939 B | 938 B | -1 B |
Overall change | 2.84 kB | 2.83 kB | -4 B |
Diffs
Diff for 677f882d2ed8..ba38b6fc0.js
@@ -867,7 +867,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _e$state = e.state,
url = _e$state.url,
as = _e$state.as,
- options = _e$state.options;
+ options = _e$state.options,
+ __N = _e$state.__N;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(url),
pathname = _ref2.pathname; // Make sure we don't re-render on initial load,
@@ -1325,7 +1331,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url: url,
as: as,
- options: options
+ options: options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for 677f882d2ed8..bf.module.js
@@ -725,7 +725,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return;
}
- var { url, as, options } = e.state;
+ var { url, as, options, __N } = e.state;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
+
var { pathname } = (0, _parseRelativeUrl.parseRelativeUrl)(url); // Make sure we don't re-render on initial load,
// can be caused by navigating back from an external site
@@ -1046,7 +1052,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url,
as,
- options
+ options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2dc90adea09ba38b6fc0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.267f864a969168992e22.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -122,13 +122,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2dc90adea09ba38b6fc0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.267f864a969168992e22.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2dc90adea09ba38b6fc0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.267f864a969168992e22.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 14.1s | 14.6s | |
nodeModulesSize | 66.4 MB | 66.4 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..28cd.js gzip | 10.1 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..b2eb.js gzip | N/A | 10.1 kB | N/A |
Overall change | 87.5 kB | 87.5 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.1 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.11 kB | N/A |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_error.js | 881 kB | 881 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.82 kB | 3.82 kB | ✓ |
index.js | 881 kB | 881 kB | ✓ |
link.js | 922 kB | 922 kB | |
routerDirect.js | 916 kB | 916 kB | |
withRouter.js | 916 kB | 916 kB | |
Overall change | 4.52 MB | 4.52 MB |
Failing test suitesCommit: c9ab6a8 test/integration/build-output/test/index.test.js
Expand output● Build Output › Basic Application Output › should not deviate from snapshot
|
Janpot
changed the title
Ignore history not created by next.js
Ignore history state not created by next.js
Jul 22, 2020
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 12.8s | 12.1s | -713ms |
nodeModulesSize | 66.4 MB | 66.4 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.985 | 1.916 | -0.07 |
/ avg req/sec | 1259.23 | 1304.94 | +45.71 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.201 | 1.226 | |
/error-in-render avg req/sec | 2081.23 | 2039.34 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..28cd.js gzip | 10.1 kB | 10.1 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
Overall change | 87.5 kB | 87.5 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.1 kB | 6.11 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
index.html gzip | 947 B | 945 B | -2 B |
link.html gzip | 952 B | 951 B | -1 B |
withRouter.html gzip | 939 B | 938 B | -1 B |
Overall change | 2.84 kB | 2.83 kB | -4 B |
Diffs
Diff for 677f882d2ed8..ba38b6fc0.js
@@ -867,7 +867,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _e$state = e.state,
url = _e$state.url,
as = _e$state.as,
- options = _e$state.options;
+ options = _e$state.options,
+ __N = _e$state.__N;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(url),
pathname = _ref2.pathname; // Make sure we don't re-render on initial load,
@@ -1325,7 +1331,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url: url,
as: as,
- options: options
+ options: options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for 677f882d2ed8..bf.module.js
@@ -725,7 +725,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return;
}
- var { url, as, options } = e.state;
+ var { url, as, options, __N } = e.state;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
+
var { pathname } = (0, _parseRelativeUrl.parseRelativeUrl)(url); // Make sure we don't re-render on initial load,
// can be caused by navigating back from an external site
@@ -1046,7 +1052,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url,
as,
- options
+ options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2dc90adea09ba38b6fc0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.267f864a969168992e22.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -122,13 +122,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2dc90adea09ba38b6fc0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.267f864a969168992e22.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.2dc90adea09ba38b6fc0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.267f864a969168992e22.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.d8c79cdca1f5b78aa6bf.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.af14f93beba74c6f3461.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 13.3s | 13.3s | -62ms |
nodeModulesSize | 66.4 MB | 66.4 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..28cd.js gzip | 10.1 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..b2eb.js gzip | N/A | 10.1 kB | N/A |
Overall change | 87.5 kB | 87.5 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.1 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.11 kB | N/A |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_error.js | 881 kB | 881 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.82 kB | 3.82 kB | ✓ |
index.js | 881 kB | 881 kB | ✓ |
link.js | 922 kB | 922 kB | |
routerDirect.js | 916 kB | 916 kB | |
withRouter.js | 916 kB | 916 kB | |
Overall change | 4.52 MB | 4.52 MB |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 13.1s | 13s | -77ms |
nodeModulesSize | 66.5 MB | 66.5 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.226 | 2.26 | |
/ avg req/sec | 1123.14 | 1106.11 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.434 | 1.385 | -0.05 |
/error-in-render avg req/sec | 1743.57 | 1805.6 | +62.03 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..7778.js gzip | 10.2 kB | 10.2 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
Overall change | 87.6 kB | 87.6 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.08 kB | 6.09 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
index.html gzip | 946 B | 948 B | |
link.html gzip | 953 B | 953 B | ✓ |
withRouter.html gzip | 940 B | 939 B | -1 B |
Overall change | 2.84 kB | 2.84 kB |
Diffs
Diff for 677f882d2ed8..66.module.js
@@ -725,7 +725,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return;
}
- var { url, as, options } = e.state;
+ var { url, as, options, __N } = e.state;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
+
var { pathname } = (0, _parseRelativeUrl.parseRelativeUrl)(url); // Make sure we don't re-render on initial load,
// can be caused by navigating back from an external site
@@ -1046,7 +1052,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url,
as,
- options
+ options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for 677f882d2ed8..dd94745b0.js
@@ -867,7 +867,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _e$state = e.state,
url = _e$state.url,
as = _e$state.as,
- options = _e$state.options;
+ options = _e$state.options,
+ __N = _e$state.__N;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(url),
pathname = _ref2.pathname; // Make sure we don't re-render on initial load,
@@ -1325,7 +1331,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url: url,
as: as,
- options: options
+ options: options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -122,13 +122,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 14.5s | 14.3s | -261ms |
nodeModulesSize | 66.5 MB | 66.5 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..7778.js gzip | 10.2 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..b7a9.js gzip | N/A | 10.2 kB | N/A |
Overall change | 87.6 kB | 87.6 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.08 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.09 kB | N/A |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_error.js | 881 kB | 881 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.82 kB | 3.82 kB | ✓ |
index.js | 881 kB | 881 kB | ✓ |
link.js | 922 kB | 922 kB | |
routerDirect.js | 916 kB | 916 kB | |
withRouter.js | 916 kB | 916 kB | |
Overall change | 4.52 MB | 4.52 MB |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 11.6s | 11.5s | -81ms |
nodeModulesSize | 66.5 MB | 66.5 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.909 | 1.879 | -0.03 |
/ avg req/sec | 1309.77 | 1330.56 | +20.79 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.228 | 1.06 | -0.17 |
/error-in-render avg req/sec | 2035.75 | 2357.88 | +322.13 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..7778.js gzip | 10.2 kB | 10.2 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
Overall change | 87.6 kB | 87.6 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.08 kB | 6.09 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
index.html gzip | 946 B | 948 B | |
link.html gzip | 953 B | 953 B | ✓ |
withRouter.html gzip | 940 B | 939 B | -1 B |
Overall change | 2.84 kB | 2.84 kB |
Diffs
Diff for 677f882d2ed8..66.module.js
@@ -725,7 +725,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return;
}
- var { url, as, options } = e.state;
+ var { url, as, options, __N } = e.state;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
+
var { pathname } = (0, _parseRelativeUrl.parseRelativeUrl)(url); // Make sure we don't re-render on initial load,
// can be caused by navigating back from an external site
@@ -1046,7 +1052,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url,
as,
- options
+ options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for 677f882d2ed8..dd94745b0.js
@@ -867,7 +867,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _e$state = e.state,
url = _e$state.url,
as = _e$state.as,
- options = _e$state.options;
+ options = _e$state.options,
+ __N = _e$state.__N;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(url),
pathname = _ref2.pathname; // Make sure we don't re-render on initial load,
@@ -1325,7 +1331,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url: url,
as: as,
- options: options
+ options: options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -122,13 +122,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 12.3s | 12.5s | |
nodeModulesSize | 66.5 MB | 66.5 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..7778.js gzip | 10.2 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-8da3811..3b61.js gzip | 6.72 kB | 6.72 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..b7a9.js gzip | N/A | 10.2 kB | N/A |
Overall change | 87.6 kB | 87.6 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.08 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-43a8e8b..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.09 kB | N/A |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_error.js | 881 kB | 881 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.82 kB | 3.82 kB | ✓ |
index.js | 881 kB | 881 kB | ✓ |
link.js | 922 kB | 922 kB | |
routerDirect.js | 916 kB | 916 kB | |
withRouter.js | 916 kB | 916 kB | |
Overall change | 4.52 MB | 4.52 MB |
timneutkens
approved these changes
Jul 28, 2020
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 12.6s | 12.5s | -50ms |
nodeModulesSize | 64.6 MB | 64.6 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.014 | 2.043 | |
/ avg req/sec | 1241.39 | 1223.58 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.214 | 1.238 | |
/error-in-render avg req/sec | 2059.71 | 2019.95 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..7778.js gzip | 10.2 kB | 10.2 kB | |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-af9a1a4..87fe.js gzip | 6.71 kB | 6.71 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
Overall change | 87.6 kB | 87.6 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.08 kB | 6.09 kB | |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-69d5e5f..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
index.html gzip | 945 B | 946 B | |
link.html gzip | 954 B | 953 B | -1 B |
withRouter.html gzip | 940 B | 940 B | ✓ |
Overall change | 2.84 kB | 2.84 kB | ✓ |
Diffs
Diff for 677f882d2ed8..66.module.js
@@ -725,7 +725,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return;
}
- var { url, as, options } = e.state;
+ var { url, as, options, __N } = e.state;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
+
var { pathname } = (0, _parseRelativeUrl.parseRelativeUrl)(url); // Make sure we don't re-render on initial load,
// can be caused by navigating back from an external site
@@ -1046,7 +1052,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url,
as,
- options
+ options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for 677f882d2ed8..dd94745b0.js
@@ -867,7 +867,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var _e$state = e.state,
url = _e$state.url,
as = _e$state.as,
- options = _e$state.options;
+ options = _e$state.options,
+ __N = _e$state.__N;
+
+ if (!__N) {
+ // this history state wasn't created by next.js so it can be ignored
+ return;
+ }
var _ref2 = (0, _parseRelativeUrl.parseRelativeUrl)(url),
pathname = _ref2.pathname; // Make sure we don't re-render on initial load,
@@ -1325,7 +1331,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
url: url,
as: as,
- options: options
+ options: options,
+ __N: true
}, // Most browsers currently ignores this parameter, although they may use it in the future.
// Passing the empty string here should be safe against future changes to the method.
// https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -122,13 +122,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -117,13 +117,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.b6fbb309365dd94745b0.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.289defeb577dbb170329.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.3e25cf5b73a50398fe66.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.277a28e61ddacb493af9.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
buildDuration | 13.8s | 13.8s | |
nodeModulesSize | 64.6 MB | 64.6 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..7778.js gzip | 10.2 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-af9a1a4..87fe.js gzip | 6.71 kB | 6.71 kB | ✓ |
polyfills-05..1236.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-488d..c0e7.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..b7a9.js gzip | N/A | 10.2 kB | N/A |
Overall change | 87.6 kB | 87.6 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.08 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
main-69d5e5f..dule.js gzip | 5.79 kB | 5.79 kB | ✓ |
polyfills-05..dule.js gzip | 30.8 kB | 30.8 kB | ✓ |
webpack-4f62..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.09 kB | N/A |
Overall change | 82.6 kB | 82.6 kB |
Client Pages
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-8f5f611..1f7b.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8e69b..8695.js gzip | 3.41 kB | 3.41 kB | ✓ |
hooks-f7f3d0..7465.js gzip | 887 B | 887 B | ✓ |
index-08fb3f..c0e9.js gzip | 227 B | 227 B | ✓ |
link-ddd176e..5566.js gzip | 1.29 kB | 1.29 kB | ✓ |
routerDirect..8aa1.js gzip | 284 B | 284 B | ✓ |
withRouter-f..e777.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.66 kB | 7.66 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_app-669dbe5..dule.js gzip | 626 B | 626 B | ✓ |
_error-663e6..dule.js gzip | 2.24 kB | 2.24 kB | ✓ |
hooks-805c40..dule.js gzip | 387 B | 387 B | ✓ |
index-6ba5a4..dule.js gzip | 226 B | 226 B | ✓ |
link-69bc264..dule.js gzip | 1.25 kB | 1.25 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-d..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.29 kB | 5.29 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_buildManifest.js gzip | 275 B | 275 B | ✓ |
_buildManife..dule.js gzip | 281 B | 281 B | ✓ |
Overall change | 556 B | 556 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | Janpot/next.js foreign-history | Change | |
---|---|---|---|
_error.js | 880 kB | 880 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.82 kB | 3.82 kB | ✓ |
index.js | 881 kB | 881 kB | ✓ |
link.js | 921 kB | 921 kB | |
routerDirect.js | 915 kB | 915 kB | |
withRouter.js | 915 kB | 915 kB | |
Overall change | 4.52 MB | 4.52 MB |
Merged
LauraBeatris
pushed a commit
to LauraBeatris/next.js
that referenced
this pull request
Sep 1, 2020
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
LauraBeatris
pushed a commit
to LauraBeatris/next.js
that referenced
this pull request
Sep 1, 2020
Irrelevant since vercel#15379
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.
Fixes #15256
Fixes #15482