-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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 locale false handling #18115
Merged
Merged
Add locale false handling #18115
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 | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
buildDuration | 13.4s | 13.8s | |
nodeModulesSize | 91.2 MB | 91.2 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.674 | 2.573 | -0.1 |
/ avg req/sec | 934.88 | 971.56 | +36.68 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.552 | 1.695 | |
/error-in-render avg req/sec | 1611.02 | 1474.87 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..35e7.js gzip | 11.1 kB | 11.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-23d7afb..be6f.js gzip | 7.34 kB | 7.34 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.1 kB | 58.2 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.94 kB | 6.95 kB | |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-ccae7c3..dule.js gzip | 6.32 kB | 6.32 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53 kB | 53 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-9a0b9e1..b37e.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-ed1b0..8fbd.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-89731c..c609.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-89ad9e7..25bb.js gzip | 1.34 kB | 1.35 kB | |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.74 kB | 7.75 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-aeb707b..dule.js gzip | 1.29 kB | 1.31 kB | |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.39 kB | 5.4 kB |
Client Build Manifests Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 323 B | |
_buildManife..dule.js gzip | 329 B | 329 B | ✓ |
Overall change | 651 B | 652 B |
Rendered Page Sizes
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
index.html gzip | 1 kB | 1 kB | -1 B |
link.html gzip | 1.01 kB | 1.01 kB | -1 B |
withRouter.html gzip | 994 B | 996 B | |
Overall change | 3.01 kB | 3.01 kB | ✓ |
Diffs
Diff for _buildManifest.js
@@ -7,7 +7,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-8001dc76075832ee8949.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-7236526bde7b14102ab7.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-904912004ceca08709a4.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-2e9bfd441bd88cd3382e.js"
],
Diff for _buildManifest.module.js
@@ -10,7 +10,7 @@ self.__BUILD_MANIFEST = {
"static\u002Fchunks\u002Fpages\u002Fhooks-56fa58a6f0993d7d36d7.module.js"
],
"/link": [
- "static\u002Fchunks\u002Fpages\u002Flink-3a2f793c262b292c369c.module.js"
+ "static\u002Fchunks\u002Fpages\u002Flink-306d7b0a56e411f2198f.module.js"
],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-368af3dfef3c9cd99dc3.module.js"
Diff for link-3a2f793..9c.module.js
@@ -314,7 +314,7 @@
childProps.href = (0, _router.addBasePath)(
(0, _router.addLocale)(
as,
- locale || (router && router.locale),
+ typeof locale !== "undefined" ? locale : router && router.locale,
router && router.defaultLocale
)
);
Diff for link-7236526..b14102ab7.js
@@ -334,7 +334,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
childProps.href = (0, _router.addBasePath)(
(0, _router.addLocale)(
as,
- locale || (router && router.locale),
+ typeof locale !== "undefined" ? locale : router && router.locale,
router && router.defaultLocale
)
);
Diff for 677f882d2ed8..d3.module.js
@@ -932,7 +932,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
url,
as,
Object.assign({}, options, {
- shallow: options.shallow && this._shallow
+ shallow: options.shallow && this._shallow,
+ locale: options.locale || this.defaultLocale
})
);
}; // represents the current component key
@@ -1067,7 +1068,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return false;
}
- this.locale = options.locale || this.locale;
+ if (false) {
+ var localePathResult, normalizeLocalePath;
+ }
if (!options._h) {
this.isSsr = false;
@@ -1081,7 +1084,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.abortComponentLoad(this._inFlightRoute);
}
- as = addLocale(as, this.locale, this.defaultLocale);
+ as = addLocale(as, options.locale, this.defaultLocale);
var cleanedAs = delLocale(
hasBasePath(as) ? delBasePath(as) : as,
this.locale
@@ -1249,7 +1252,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.changeState(
method,
url,
- addLocale(as, this.locale, this.defaultLocale),
+ addLocale(as, options.locale, this.defaultLocale),
options
);
Diff for 677f882d2ed8..5b45de20a.js
@@ -1088,7 +1088,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
url,
as,
Object.assign({}, options, {
- shallow: options.shallow && _this._shallow
+ shallow: options.shallow && _this._shallow,
+ locale: options.locale || _this.defaultLocale
})
);
}; // represents the current component key
@@ -1244,7 +1245,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
) {
var _this2 = this;
- var cleanedAs,
+ var _require,
+ normalizeLocalePath,
+ localePathResult,
+ cleanedAs,
pages,
_yield$this$pageLoade,
rewrites,
@@ -1287,7 +1291,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return _context.abrupt("return", false);
case 3:
- this.locale = options.locale || this.locale;
+ if (false) {
+ }
if (!options._h) {
this.isSsr = false;
@@ -1301,7 +1306,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.abortComponentLoad(this._inFlightRoute);
}
- as = addLocale(as, this.locale, this.defaultLocale);
+ as = addLocale(
+ as,
+ options.locale,
+ this.defaultLocale
+ );
cleanedAs = delLocale(
hasBasePath(as) ? delBasePath(as) : as,
this.locale
@@ -1549,7 +1558,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.changeState(
method,
url,
- addLocale(as, this.locale, this.defaultLocale),
+ addLocale(as, options.locale, this.defaultLocale),
options
);
@@ -1790,7 +1799,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
Component,
__N_SSG,
__N_SSP,
- _require,
+ _require2,
isValidElementType,
dataHref,
props,
@@ -1858,7 +1867,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
break;
}
- (_require = __webpack_require__(
+ (_require2 = __webpack_require__(
!(function webpackMissingModule() {
var e = new Error(
"Cannot find module 'react-is'"
@@ -1868,7 +1877,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
})()
)),
(isValidElementType =
- _require.isValidElementType);
+ _require2.isValidElementType);
if (isValidElementType(Component)) {
_context3.next = 18;
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -121,13 +121,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1f665b9cff05b45de20a.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.6f056657ef18921c03c1.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -36,7 +36,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-3a2f793c262b292c369c.module.js"
+ href="/_next/static/chunks/pages/link-306d7b0a56e411f2198f.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -126,13 +126,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1f665b9cff05b45de20a.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.6f056657ef18921c03c1.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
async=""
crossorigin="anonymous"
type="module"
@@ -150,13 +150,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/pages/link-7236526bde7b14102ab7.js"
+ src="/_next/static/chunks/pages/link-904912004ceca08709a4.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/pages/link-3a2f793c262b292c369c.module.js"
+ src="/_next/static/chunks/pages/link-306d7b0a56e411f2198f.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -121,13 +121,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1f665b9cff05b45de20a.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.6f056657ef18921c03c1.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
buildDuration | 15.6s | 15.4s | -205ms |
nodeModulesSize | 91.2 MB | 91.2 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..35e7.js gzip | 11.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-23d7afb..be6f.js gzip | 7.34 kB | 7.34 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..640c.js gzip | N/A | 11.1 kB | N/A |
Overall change | 58.1 kB | 58.2 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.94 kB | N/A | N/A |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-ccae7c3..dule.js gzip | 6.32 kB | 6.32 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.95 kB | N/A |
Overall change | 53 kB | 53 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-9a0b9e1..b37e.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-ed1b0..8fbd.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-89731c..c609.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-89ad9e7..25bb.js gzip | 1.34 kB | N/A | N/A |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
link-41ceea0..6b62.js gzip | N/A | 1.35 kB | N/A |
Overall change | 7.74 kB | 7.75 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-aeb707b..dule.js gzip | 1.29 kB | N/A | N/A |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
link-2d41a89..dule.js gzip | N/A | 1.31 kB | N/A |
Overall change | 5.39 kB | 5.4 kB |
Client Build Manifests Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 323 B | |
_buildManife..dule.js gzip | 329 B | 329 B | ✓ |
Overall change | 651 B | 652 B |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_error.js | 1.06 MB | 1.06 MB | ✓ |
404.html | 4.73 kB | 4.73 kB | ✓ |
hooks.html | 3.92 kB | 3.92 kB | ✓ |
index.js | 1.06 MB | 1.06 MB | ✓ |
link.js | 1.1 MB | 1.1 MB | |
routerDirect.js | 1.1 MB | 1.1 MB | |
withRouter.js | 1.1 MB | 1.1 MB | |
Overall change | 5.42 MB | 5.42 MB |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
buildDuration | 11.4s | 12.3s | |
nodeModulesSize | 91.2 MB | 91.2 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.441 | 2.233 | -0.21 |
/ avg req/sec | 1024.2 | 1119.63 | +95.43 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.617 | 1.411 | -0.21 |
/error-in-render avg req/sec | 1546.07 | 1771.25 | +225.18 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..35e7.js gzip | 11.1 kB | 11.1 kB | |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-23d7afb..be6f.js gzip | 7.34 kB | 7.34 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.1 kB | 58.2 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.94 kB | 6.95 kB | |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-ccae7c3..dule.js gzip | 6.32 kB | 6.32 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53 kB | 53 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-9a0b9e1..b37e.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-ed1b0..8fbd.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-89731c..c609.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-89ad9e7..25bb.js gzip | 1.34 kB | 1.35 kB | |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.74 kB | 7.75 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-aeb707b..dule.js gzip | 1.29 kB | 1.31 kB | |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.39 kB | 5.4 kB |
Client Build Manifests Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 323 B | |
_buildManife..dule.js gzip | 329 B | 329 B | ✓ |
Overall change | 651 B | 652 B |
Rendered Page Sizes
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
index.html gzip | 1 kB | 1 kB | -1 B |
link.html gzip | 1.01 kB | 1.01 kB | -1 B |
withRouter.html gzip | 994 B | 996 B | |
Overall change | 3.01 kB | 3.01 kB | ✓ |
Diffs
Diff for _buildManifest.js
@@ -7,7 +7,7 @@ self.__BUILD_MANIFEST = {
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-8001dc76075832ee8949.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-7236526bde7b14102ab7.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-904912004ceca08709a4.js"],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-2e9bfd441bd88cd3382e.js"
],
Diff for _buildManifest.module.js
@@ -10,7 +10,7 @@ self.__BUILD_MANIFEST = {
"static\u002Fchunks\u002Fpages\u002Fhooks-56fa58a6f0993d7d36d7.module.js"
],
"/link": [
- "static\u002Fchunks\u002Fpages\u002Flink-3a2f793c262b292c369c.module.js"
+ "static\u002Fchunks\u002Fpages\u002Flink-306d7b0a56e411f2198f.module.js"
],
"/routerDirect": [
"static\u002Fchunks\u002Fpages\u002FrouterDirect-368af3dfef3c9cd99dc3.module.js"
Diff for link-3a2f793..9c.module.js
@@ -314,7 +314,7 @@
childProps.href = (0, _router.addBasePath)(
(0, _router.addLocale)(
as,
- locale || (router && router.locale),
+ typeof locale !== "undefined" ? locale : router && router.locale,
router && router.defaultLocale
)
);
Diff for link-7236526..b14102ab7.js
@@ -334,7 +334,7 @@ _N_E = (window["webpackJsonp_N_E"] = window["webpackJsonp_N_E"] || []).push([
childProps.href = (0, _router.addBasePath)(
(0, _router.addLocale)(
as,
- locale || (router && router.locale),
+ typeof locale !== "undefined" ? locale : router && router.locale,
router && router.defaultLocale
)
);
Diff for 677f882d2ed8..d3.module.js
@@ -932,7 +932,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
url,
as,
Object.assign({}, options, {
- shallow: options.shallow && this._shallow
+ shallow: options.shallow && this._shallow,
+ locale: options.locale || this.defaultLocale
})
);
}; // represents the current component key
@@ -1067,7 +1068,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return false;
}
- this.locale = options.locale || this.locale;
+ if (false) {
+ var localePathResult, normalizeLocalePath;
+ }
if (!options._h) {
this.isSsr = false;
@@ -1081,7 +1084,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.abortComponentLoad(this._inFlightRoute);
}
- as = addLocale(as, this.locale, this.defaultLocale);
+ as = addLocale(as, options.locale, this.defaultLocale);
var cleanedAs = delLocale(
hasBasePath(as) ? delBasePath(as) : as,
this.locale
@@ -1249,7 +1252,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.changeState(
method,
url,
- addLocale(as, this.locale, this.defaultLocale),
+ addLocale(as, options.locale, this.defaultLocale),
options
);
Diff for 677f882d2ed8..5b45de20a.js
@@ -1088,7 +1088,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
url,
as,
Object.assign({}, options, {
- shallow: options.shallow && _this._shallow
+ shallow: options.shallow && _this._shallow,
+ locale: options.locale || _this.defaultLocale
})
);
}; // represents the current component key
@@ -1244,7 +1245,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
) {
var _this2 = this;
- var cleanedAs,
+ var _require,
+ normalizeLocalePath,
+ localePathResult,
+ cleanedAs,
pages,
_yield$this$pageLoade,
rewrites,
@@ -1287,7 +1291,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return _context.abrupt("return", false);
case 3:
- this.locale = options.locale || this.locale;
+ if (false) {
+ }
if (!options._h) {
this.isSsr = false;
@@ -1301,7 +1306,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.abortComponentLoad(this._inFlightRoute);
}
- as = addLocale(as, this.locale, this.defaultLocale);
+ as = addLocale(
+ as,
+ options.locale,
+ this.defaultLocale
+ );
cleanedAs = delLocale(
hasBasePath(as) ? delBasePath(as) : as,
this.locale
@@ -1549,7 +1558,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
this.changeState(
method,
url,
- addLocale(as, this.locale, this.defaultLocale),
+ addLocale(as, options.locale, this.defaultLocale),
options
);
@@ -1790,7 +1799,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
Component,
__N_SSG,
__N_SSP,
- _require,
+ _require2,
isValidElementType,
dataHref,
props,
@@ -1858,7 +1867,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
break;
}
- (_require = __webpack_require__(
+ (_require2 = __webpack_require__(
!(function webpackMissingModule() {
var e = new Error(
"Cannot find module 'react-is'"
@@ -1868,7 +1877,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
})()
)),
(isValidElementType =
- _require.isValidElementType);
+ _require2.isValidElementType);
if (isValidElementType(Component)) {
_context3.next = 18;
Diff for index.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -121,13 +121,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1f665b9cff05b45de20a.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.6f056657ef18921c03c1.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -36,7 +36,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-3a2f793c262b292c369c.module.js"
+ href="/_next/static/chunks/pages/link-306d7b0a56e411f2198f.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -126,13 +126,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1f665b9cff05b45de20a.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.6f056657ef18921c03c1.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
async=""
crossorigin="anonymous"
type="module"
@@ -150,13 +150,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/pages/link-7236526bde7b14102ab7.js"
+ src="/_next/static/chunks/pages/link-904912004ceca08709a4.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/pages/link-3a2f793c262b292c369c.module.js"
+ src="/_next/static/chunks/pages/link-306d7b0a56e411f2198f.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -121,13 +121,13 @@
type="module"
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.1f665b9cff05b45de20a.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.6f056657ef18921c03c1.js"
async=""
crossorigin="anonymous"
nomodule=""
></script>
<script
- src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.15d98acc7b022abf75d3.module.js"
+ src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.ebd915fa48f945c8741a.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
buildDuration | 13.3s | 13.1s | -164ms |
nodeModulesSize | 91.2 MB | 91.2 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..35e7.js gzip | 11.1 kB | N/A | N/A |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-23d7afb..be6f.js gzip | 7.34 kB | 7.34 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..640c.js gzip | N/A | 11.1 kB | N/A |
Overall change | 58.1 kB | 58.2 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 6.94 kB | N/A | N/A |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-ccae7c3..dule.js gzip | 6.32 kB | 6.32 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
677f882d2ed8..dule.js gzip | N/A | 6.95 kB | N/A |
Overall change | 53 kB | 53 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-9a0b9e1..b37e.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-ed1b0..8fbd.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-89731c..c609.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-89ad9e7..25bb.js gzip | 1.34 kB | N/A | N/A |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
link-41ceea0..6b62.js gzip | N/A | 1.35 kB | N/A |
Overall change | 7.74 kB | 7.75 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-4469a..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-aeb707b..dule.js gzip | 1.29 kB | N/A | N/A |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
link-2d41a89..dule.js gzip | N/A | 1.31 kB | N/A |
Overall change | 5.39 kB | 5.4 kB |
Client Build Manifests Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_buildManifest.js gzip | 322 B | 323 B | |
_buildManife..dule.js gzip | 329 B | 329 B | ✓ |
Overall change | 651 B | 652 B |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | ijjk/next.js i18n/link-locale-false | Change | |
---|---|---|---|
_error.js | 1.06 MB | 1.06 MB | ✓ |
404.html | 4.73 kB | 4.73 kB | ✓ |
hooks.html | 3.92 kB | 3.92 kB | ✓ |
index.js | 1.06 MB | 1.06 MB | ✓ |
link.js | 1.1 MB | 1.1 MB | |
routerDirect.js | 1.1 MB | 1.1 MB | |
withRouter.js | 1.1 MB | 1.1 MB | |
Overall change | 5.42 MB | 5.42 MB |
timneutkens
approved these changes
Oct 22, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds handling to allow setting the locale option for
next/link
andnext/router
tofalse
to prevent auto-prepending the locale to the URL to allow passing the already prepared URLx-ref: #17370
x-ref: #18086