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
Remove rewriteUrlForNextExport from bundles when option is not enabled #9946
Merged
Timer
merged 2 commits into
vercel:canary
from
timneutkens:fix/remove-rewrite-url-for-next-export
Jan 4, 2020
Merged
Remove rewriteUrlForNextExport from bundles when option is not enabled #9946
Timer
merged 2 commits into
vercel:canary
from
timneutkens:fix/remove-rewrite-url-for-next-export
Jan 4, 2020
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 (Decrease detected ✓)General Overall increase
|
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
buildDuration | 12.4s | 12.5s | |
nodeModulesSize | 48.9 MB | 48.9 MB |
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.js gzip | 6.45 kB | 6.45 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..6ef5.js gzip | 13.8 kB | 13.7 kB | -100 B |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 68.9 kB | 68.8 kB | -100 B |
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.43 kB | 5.43 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 12.6 kB | 12.5 kB | -78 B |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 63.4 kB | 63.4 kB | -78 B |
Legacy Client Bundles (polyfills)
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.91 kB | 2.9 kB | -7 B |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.88 kB | 9.87 kB | -7 B |
Client Pages Modern Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.module.js gzip | 757 B | 757 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.48 kB | 2.47 kB | -7 B |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.42 kB | 7.41 kB | -7 B |
Client Build Manifests
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
index.html gzip | 1.03 kB | 1.03 kB | -1 B |
link.html gzip | 1.04 kB | 1.04 kB | -1 B |
withRouter.html gzip | 1.03 kB | 1.03 kB | -1 B |
Overall change | 3.11 kB | 3.1 kB | -3 B |
Diffs
Diff for link.js
@@ -447,8 +447,6 @@
var _router = _interopRequireDefault(__webpack_require__('nOHt'))
- var _rewriteUrlForExport = __webpack_require__('P5f7')
-
var _utils = __webpack_require__('g/15')
function isLocal(href) {
@@ -753,6 +751,7 @@
// "<page>/index.html" directly.
if (false) {
+ var rewriteUrlForNextExport
}
return _react['default'].cloneElement(child, props)
Diff for link.module.js
@@ -322,8 +322,6 @@
var _router = _interopRequireDefault(__webpack_require__('nOHt'))
- var _rewriteUrlForExport = __webpack_require__('P5f7')
-
var _utils = __webpack_require__('g/15')
function isLocal(href) {
@@ -571,6 +569,7 @@
// "<page>/index.html" directly.
if (false) {
+ var rewriteUrlForNextExport
}
return _react.default.cloneElement(child, props)
Diff for de003c3a9d30..9a.module.js
@@ -1126,32 +1126,6 @@
/***/
},
- /***/ P5f7: /***/ function(module, exports, __webpack_require__) {
- 'use strict'
-
- var _Object$defineProperty = __webpack_require__('hfKm')
-
- _Object$defineProperty(exports, '__esModule', {
- value: true,
- })
-
- function rewriteUrlForNextExport(url) {
- var [pathname, hash] = url.split('#') // tslint:disable-next-line
-
- var [path, qs] = pathname.split('?')
- path = path.replace(/\/$/, '') // Append a trailing slash if this path does not have an extension
-
- if (!/\.[^/]+\/?$/.test(path)) path += '/'
- if (qs) path += '?' + qs
- if (hash) path += '#' + hash
- return path
- }
-
- exports.rewriteUrlForNextExport = rewriteUrlForNextExport
-
- /***/
- },
-
/***/ PBE1: /***/ function(module, exports, __webpack_require__) {
'use strict'
// https://github.com/tc39/proposal-promise-finally
@@ -1811,8 +1785,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var utils_1 = __webpack_require__('g/15')
- var rewrite_url_for_export_1 = __webpack_require__('P5f7')
-
var is_dynamic_1 = __webpack_require__('/jkW')
var route_matcher_1 = __webpack_require__('gguc')
@@ -1970,7 +1942,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
} // @deprecated backwards compatibility even though it's a private method.
static _rewriteUrlForNextExport(url) {
- return rewrite_url_for_export_1.rewriteUrlForNextExport(url)
+ if (false) {
+ var rewriteUrlForNextExport
+ } else {
+ return url
+ }
}
update(route, mod) {
@@ -2064,6 +2040,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
// "<page>/index.html" directly for the SSR page.
if (false) {
+ var rewriteUrlForNextExport
}
this.abortComponentLoad(as) // If the url change is only related to a hash change
Diff for de003c3a9d30..5fa7da92f.js
@@ -765,41 +765,6 @@
/***/
},
- /***/ P5f7: /***/ function(module, exports, __webpack_require__) {
- 'use strict'
-
- var _slicedToArray = __webpack_require__('8+Nu')
-
- var _Object$defineProperty = __webpack_require__('hfKm')
-
- _Object$defineProperty(exports, '__esModule', {
- value: true,
- })
-
- function rewriteUrlForNextExport(url) {
- var _url$split = url.split('#'),
- _url$split2 = _slicedToArray(_url$split, 2),
- pathname = _url$split2[0],
- hash = _url$split2[1] // tslint:disable-next-line
-
- var _pathname$split = pathname.split('?'),
- _pathname$split2 = _slicedToArray(_pathname$split, 2),
- path = _pathname$split2[0],
- qs = _pathname$split2[1]
-
- path = path.replace(/\/$/, '') // Append a trailing slash if this path does not have an extension
-
- if (!/\.[^/]+\/?$/.test(path)) path += '/'
- if (qs) path += '?' + qs
- if (hash) path += '#' + hash
- return path
- }
-
- exports.rewriteUrlForNextExport = rewriteUrlForNextExport
-
- /***/
- },
-
/***/ PBE1: /***/ function(module, exports, __webpack_require__) {
'use strict'
// https://github.com/tc39/proposal-promise-finally
@@ -1475,8 +1440,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var utils_1 = __webpack_require__('g/15')
- var rewrite_url_for_export_1 = __webpack_require__('P5f7')
-
var is_dynamic_1 = __webpack_require__('/jkW')
var route_matcher_1 = __webpack_require__('gguc')
@@ -1756,6 +1719,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
// "<page>/index.html" directly for the SSR page.
if (false) {
+ var rewriteUrlForNextExport
}
_this2.abortComponentLoad(as) // If the url change is only related to a hash change
@@ -2257,7 +2221,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
key: '_rewriteUrlForNextExport',
value: function _rewriteUrlForNextExport(url) {
- return rewrite_url_for_export_1.rewriteUrlForNextExport(url)
+ if (false) {
+ var rewriteUrlForNextExport
+ } else {
+ return url
+ }
},
},
]
Diff for index.html
@@ -39,7 +39,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -151,13 +151,13 @@
type="module"
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.a956fdaeb9a5fa7da92f.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
async=""
crossorigin="anonymous"
nomodule=""
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -39,7 +39,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -156,13 +156,13 @@
type="module"
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.a956fdaeb9a5fa7da92f.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
async=""
crossorigin="anonymous"
nomodule=""
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -39,7 +39,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -151,13 +151,13 @@
type="module"
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.a956fdaeb9a5fa7da92f.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
async=""
crossorigin="anonymous"
nomodule=""
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Decrease detected ✓)
General Overall increase ⚠️
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
buildDuration | 12.8s | 12.6s | -117ms |
nodeModulesSize | 48.9 MB | 48.9 MB |
Client Bundles (main, webpack, commons)
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.js gzip | 6.45 kB | 6.45 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..6ef5.js gzip | 13.8 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..2f75.js gzip | N/A | 13.7 kB | N/A |
Overall change | 68.9 kB | 68.8 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.43 kB | 5.43 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 12.6 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 12.5 kB | N/A |
Overall change | 63.4 kB | 63.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.91 kB | 2.9 kB | -7 B |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.88 kB | 9.87 kB | -7 B |
Client Pages Modern Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.module.js gzip | 757 B | 757 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.48 kB | 2.47 kB | -7 B |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.42 kB | 7.41 kB | -7 B |
Client Build Manifests
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_error.js gzip | 78.9 kB | 78.7 kB | -215 B |
hooks.html gzip | 1.07 kB | 1.07 kB | ✓ |
index.js gzip | 79.1 kB | 78.9 kB | -229 B |
link.js gzip | 81.3 kB | 81.1 kB | -237 B |
routerDirect.js gzip | 79.2 kB | 79 kB | -213 B |
withRouter.js gzip | 79.3 kB | 79.1 kB | -211 B |
Overall change | 399 kB | 398 kB | -1.1 kB |
Commit: f6eb575
Timer
approved these changes
Jan 4, 2020
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall increase
|
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
buildDuration | 14.3s | 14.4s | |
nodeModulesSize | 48.9 MB | 48.9 MB |
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.js gzip | 5.2 kB | 5.2 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..6ef5.js gzip | 13.8 kB | 13.7 kB | -100 B |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 67.7 kB | 67.6 kB | -100 B |
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.25 kB | 4.25 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 12.6 kB | 12.5 kB | -78 B |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 62.3 kB | 62.2 kB | -78 B |
Legacy Client Bundles (polyfills)
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.91 kB | 2.9 kB | -7 B |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.88 kB | 9.87 kB | -7 B |
Client Pages Modern Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.module.js gzip | 757 B | 757 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.48 kB | 2.47 kB | -7 B |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.42 kB | 7.41 kB | -7 B |
Client Build Manifests
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Rendered Page Sizes Overall increase ⚠️
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
index.html gzip | 1.02 kB | 1.02 kB | |
link.html gzip | 1.03 kB | 1.03 kB | |
withRouter.html gzip | 1.01 kB | 1.02 kB | |
Overall change | 3.06 kB | 3.07 kB |
Diffs
Diff for link.js
@@ -447,8 +447,6 @@
var _router = _interopRequireDefault(__webpack_require__('nOHt'))
- var _rewriteUrlForExport = __webpack_require__('P5f7')
-
var _utils = __webpack_require__('g/15')
function isLocal(href) {
@@ -753,6 +751,7 @@
// "<page>/index.html" directly.
if (false) {
+ var rewriteUrlForNextExport
}
return _react['default'].cloneElement(child, props)
Diff for link.module.js
@@ -322,8 +322,6 @@
var _router = _interopRequireDefault(__webpack_require__('nOHt'))
- var _rewriteUrlForExport = __webpack_require__('P5f7')
-
var _utils = __webpack_require__('g/15')
function isLocal(href) {
@@ -571,6 +569,7 @@
// "<page>/index.html" directly.
if (false) {
+ var rewriteUrlForNextExport
}
return _react.default.cloneElement(child, props)
Diff for de003c3a9d30..9a.module.js
@@ -1126,32 +1126,6 @@
/***/
},
- /***/ P5f7: /***/ function(module, exports, __webpack_require__) {
- 'use strict'
-
- var _Object$defineProperty = __webpack_require__('hfKm')
-
- _Object$defineProperty(exports, '__esModule', {
- value: true,
- })
-
- function rewriteUrlForNextExport(url) {
- var [pathname, hash] = url.split('#') // tslint:disable-next-line
-
- var [path, qs] = pathname.split('?')
- path = path.replace(/\/$/, '') // Append a trailing slash if this path does not have an extension
-
- if (!/\.[^/]+\/?$/.test(path)) path += '/'
- if (qs) path += '?' + qs
- if (hash) path += '#' + hash
- return path
- }
-
- exports.rewriteUrlForNextExport = rewriteUrlForNextExport
-
- /***/
- },
-
/***/ PBE1: /***/ function(module, exports, __webpack_require__) {
'use strict'
// https://github.com/tc39/proposal-promise-finally
@@ -1811,8 +1785,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var utils_1 = __webpack_require__('g/15')
- var rewrite_url_for_export_1 = __webpack_require__('P5f7')
-
var is_dynamic_1 = __webpack_require__('/jkW')
var route_matcher_1 = __webpack_require__('gguc')
@@ -1970,7 +1942,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
} // @deprecated backwards compatibility even though it's a private method.
static _rewriteUrlForNextExport(url) {
- return rewrite_url_for_export_1.rewriteUrlForNextExport(url)
+ if (false) {
+ var rewriteUrlForNextExport
+ } else {
+ return url
+ }
}
update(route, mod) {
@@ -2064,6 +2040,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
// "<page>/index.html" directly for the SSR page.
if (false) {
+ var rewriteUrlForNextExport
}
this.abortComponentLoad(as) // If the url change is only related to a hash change
Diff for de003c3a9d30..5fa7da92f.js
@@ -765,41 +765,6 @@
/***/
},
- /***/ P5f7: /***/ function(module, exports, __webpack_require__) {
- 'use strict'
-
- var _slicedToArray = __webpack_require__('8+Nu')
-
- var _Object$defineProperty = __webpack_require__('hfKm')
-
- _Object$defineProperty(exports, '__esModule', {
- value: true,
- })
-
- function rewriteUrlForNextExport(url) {
- var _url$split = url.split('#'),
- _url$split2 = _slicedToArray(_url$split, 2),
- pathname = _url$split2[0],
- hash = _url$split2[1] // tslint:disable-next-line
-
- var _pathname$split = pathname.split('?'),
- _pathname$split2 = _slicedToArray(_pathname$split, 2),
- path = _pathname$split2[0],
- qs = _pathname$split2[1]
-
- path = path.replace(/\/$/, '') // Append a trailing slash if this path does not have an extension
-
- if (!/\.[^/]+\/?$/.test(path)) path += '/'
- if (qs) path += '?' + qs
- if (hash) path += '#' + hash
- return path
- }
-
- exports.rewriteUrlForNextExport = rewriteUrlForNextExport
-
- /***/
- },
-
/***/ PBE1: /***/ function(module, exports, __webpack_require__) {
'use strict'
// https://github.com/tc39/proposal-promise-finally
@@ -1475,8 +1440,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
var utils_1 = __webpack_require__('g/15')
- var rewrite_url_for_export_1 = __webpack_require__('P5f7')
-
var is_dynamic_1 = __webpack_require__('/jkW')
var route_matcher_1 = __webpack_require__('gguc')
@@ -1756,6 +1719,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
// "<page>/index.html" directly for the SSR page.
if (false) {
+ var rewriteUrlForNextExport
}
_this2.abortComponentLoad(as) // If the url change is only related to a hash change
@@ -2257,7 +2221,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
{
key: '_rewriteUrlForNextExport',
value: function _rewriteUrlForNextExport(url) {
- return rewrite_url_for_export_1.rewriteUrlForNextExport(url)
+ if (false) {
+ var rewriteUrlForNextExport
+ } else {
+ return url
+ }
},
},
]
Diff for index.html
@@ -39,7 +39,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -151,13 +151,13 @@
type="module"
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.a956fdaeb9a5fa7da92f.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
async=""
crossorigin="anonymous"
nomodule=""
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for link.html
@@ -39,7 +39,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -156,13 +156,13 @@
type="module"
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.a956fdaeb9a5fa7da92f.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
async=""
crossorigin="anonymous"
nomodule=""
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
async=""
crossorigin="anonymous"
type="module"
Diff for withRouter.html
@@ -39,7 +39,7 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
as="script"
crossorigin="anonymous"
/>
@@ -151,13 +151,13 @@
type="module"
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.a956fdaeb9a5fa7da92f.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
async=""
crossorigin="anonymous"
nomodule=""
></script
><script
- src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.08c4064758778ec3689a.module.js"
+ src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
async=""
crossorigin="anonymous"
type="module"
Serverless Mode (Decrease detected ✓)
General Overall increase ⚠️
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
buildDuration | 14.8s | 15s | |
nodeModulesSize | 48.9 MB | 48.9 MB |
Client Bundles (main, webpack, commons)
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.js gzip | 5.2 kB | 5.2 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..54d3.js gzip | 4.68 kB | 4.68 kB | ✓ |
commons.HASH.js gzip | 4.06 kB | 4.06 kB | ✓ |
de003c3a9d30..6ef5.js gzip | 13.8 kB | N/A | N/A |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..2f75.js gzip | N/A | 13.7 kB | N/A |
Overall change | 67.7 kB | 67.6 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.25 kB | 4.25 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
4952ddcd88e7..dule.js gzip | 5.56 kB | 5.56 kB | ✓ |
de003c3a9d30..dule.js gzip | 12.6 kB | N/A | N/A |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 12.5 kB | N/A |
Overall change | 62.3 kB | 62.2 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 4.76 kB | 4.76 kB | ✓ |
Overall change | 4.76 kB | 4.76 kB | ✓ |
Client Pages Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error.js gzip | 4.07 kB | 4.07 kB | ✓ |
hooks.js gzip | 779 B | 779 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.91 kB | 2.9 kB | -7 B |
routerDirect.js gzip | 283 B | 283 B | ✓ |
withRouter.js gzip | 282 B | 282 B | ✓ |
Overall change | 9.88 kB | 9.87 kB | -7 B |
Client Pages Modern Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_app.module.js gzip | 757 B | 757 B | ✓ |
_error.module.js gzip | 3.06 kB | 3.06 kB | ✓ |
hooks.module.js gzip | 371 B | 371 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 2.48 kB | 2.47 kB | -7 B |
routerDirect..dule.js gzip | 273 B | 273 B | ✓ |
withRouter.m..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 7.42 kB | 7.41 kB | -7 B |
Client Build Manifests
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles Overall decrease ✓
zeit/next.js canary | timneutkens/next.js fix/remove-rewrite-url-for-next-export | Change | |
---|---|---|---|
_error.js gzip | 78 kB | 77.8 kB | -213 B |
hooks.html gzip | 1.05 kB | 1.06 kB | |
index.js gzip | 78.2 kB | 78 kB | -210 B |
link.js gzip | 80.6 kB | 80.4 kB | -238 B |
routerDirect.js gzip | 78.3 kB | 78.1 kB | -228 B |
withRouter.js gzip | 78.4 kB | 78.2 kB | -211 B |
Overall change | 395 kB | 394 kB | -1.1 kB |
Commit: 3f86542
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.
Ensures it's correctly tree shaken.
Depends on #9945 landing first as both reduce bundle sizes.