Skip to content
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

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Jan 4, 2020

Ensures it's correctly tree shaken.

Depends on #9945 landing first as both reduce bundle sizes.

@ijjk
Copy link
Member

ijjk commented Jan 4, 2020

Stats from current PR

Default 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 ⚠️ +112ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +534 B
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 ⚠️ +534 B
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

@ijjk
Copy link
Member

ijjk commented Jan 4, 2020

Stats from current PR

Default 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 ⚠️ +123ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +534 B
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 ⚠️ +2 B
link.html gzip 1.03 kB 1.03 kB ⚠️ +1 B
withRouter.html gzip 1.01 kB 1.02 kB ⚠️ +2 B
Overall change 3.06 kB 3.07 kB ⚠️ +5 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 14.8s 15s ⚠️ +191ms
nodeModulesSize 48.9 MB 48.9 MB ⚠️ +534 B
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 ⚠️ +2 B
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

@Timer Timer merged commit 7e817ca into vercel:canary Jan 4, 2020
@timneutkens timneutkens deleted the fix/remove-rewrite-url-for-next-export branch February 12, 2021 13:33
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants