-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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 namedRegex and routeKeys to routes manifest #12250
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
|
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
buildDuration | 10.5s | 10.5s | -4ms |
nodeModulesSize | 55.2 MB | 55.2 MB |
Page Load Tests Overall decrease ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.841 | 1.809 | -0.03 |
/ avg req/sec | 1357.75 | 1381.72 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.044 | 1.068 | |
/error-in-render avg req/sec | 2395.19 | 2340.48 | -54.71 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
main-HASH.js gzip | 6.27 kB | 6.27 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..ac5e.js gzip | 10.3 kB | N/A | N/A |
framework.a1..NSE.txt gzip | 220 B | 220 B | ✓ |
framework.a1..NSE.txt gzip | 220 B | 220 B | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
de003c3a9d30..e8e1.js gzip | N/A | 10.3 kB | N/A |
Overall change | 56.8 kB | 56.8 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.82 kB | 4.82 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.88 kB | N/A | N/A |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 6.88 kB | N/A |
Overall change | 51.5 kB | 51.5 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.2 kB | 26.2 kB | ✓ |
Overall change | 26.2 kB | 26.2 kB | ✓ |
Client Pages
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
_app.js gzip | 1.23 kB | 1.23 kB | ✓ |
_error.js gzip | 3.12 kB | 3.12 kB | ✓ |
hooks.js gzip | 663 B | 663 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 280 B | 280 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 7.85 kB | 7.85 kB | ✓ |
Client Pages Modern
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
_app.module.js gzip | 598 B | 598 B | ✓ |
_error.module.js gzip | 2.09 kB | 2.09 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 279 B | 279 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.37 kB | 5.37 kB | ✓ |
Client Build Manifests
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | 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
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
index.html gzip | 927 B | 927 B | ✓ |
link.html gzip | 937 B | 937 B | ✓ |
withRouter.html gzip | 926 B | 926 B | ✓ |
Overall change | 2.79 kB | 2.79 kB | ✓ |
Diffs
Diff for de003c3a9d30..83.module.js
@@ -245,11 +245,16 @@ module.exports = _interopRequireDefault;
Object.defineProperty(exports, "__esModule", {
value: true
-});
+}); // this isn't importing the escape-string-regex module
+// to reduce bytes
+
+function escapeRegex(str) {
+ return str.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&');
+}
function getRouteRegex(normalizedRoute) {
// Escape all characters that could be considered RegEx
- var escapedRoute = (normalizedRoute.replace(/\/$/, '') || '/').replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&');
+ var escapedRoute = escapeRegex(normalizedRoute.replace(/\/$/, '') || '/');
var groups = {};
var groupIndex = 1;
var parameterizedRoute = escapedRoute.replace(/\/\\\[([^/]+?)\\\](?=\/|$)/g, (_, $1) => {
@@ -262,10 +267,17 @@ function getRouteRegex(normalizedRoute) {
};
return isCatchAll ? '/(.+?)' : '/([^/]+?)';
});
- return {
+ var namedParameterizedRoute; // dead code eliminate for browser since it's only needed
+ // while generating routes-manifest
+
+ if (false) {}
+
+ return Object.assign({
re: new RegExp('^' + parameterizedRoute + '(?:/)?$', 'i'),
groups
- };
+ }, namedParameterizedRoute ? {
+ namedRegex: "^".concat(namedParameterizedRoute, "(?:/)?$")
+ } : {});
}
exports.getRouteRegex = getRouteRegex;
Diff for de003c3a9d30..580c6107b.js
@@ -301,11 +301,16 @@ module.exports = _createClass;
Object.defineProperty(exports, "__esModule", {
value: true
-});
+}); // this isn't importing the escape-string-regex module
+// to reduce bytes
+
+function escapeRegex(str) {
+ return str.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&');
+}
function getRouteRegex(normalizedRoute) {
// Escape all characters that could be considered RegEx
- var escapedRoute = (normalizedRoute.replace(/\/$/, '') || '/').replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&');
+ var escapedRoute = escapeRegex(normalizedRoute.replace(/\/$/, '') || '/');
var groups = {};
var groupIndex = 1;
var parameterizedRoute = escapedRoute.replace(/\/\\\[([^/]+?)\\\](?=\/|$)/g, function (_, $1) {
@@ -318,10 +323,17 @@ function getRouteRegex(normalizedRoute) {
};
return isCatchAll ? '/(.+?)' : '/([^/]+?)';
});
- return {
+ var namedParameterizedRoute; // dead code eliminate for browser since it's only needed
+ // while generating routes-manifest
+
+ if (false) {}
+
+ return Object.assign({
re: new RegExp('^' + parameterizedRoute + '(?:/)?$', 'i'),
groups: groups
- };
+ }, namedParameterizedRoute ? {
+ namedRegex: "^".concat(namedParameterizedRoute, "(?:/)?$")
+ } : {});
}
exports.getRouteRegex = getRouteRegex;
Diff for index.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2969add02d96c4018583.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false,"gip":true}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-51838dc5b2b8e0705281.js"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.9bb4b0fcebc580c6107b.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2969add02d96c4018583.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-c3e38c13c0e6434d744d.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_ssgManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_ssgManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/index.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.dcd3b906e1f4d8455e8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next">Hello world 👋</div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"BUILD_ID","isFallback":false,"gip":true}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-51838dc5b2b8e0705281.js"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/" src="/_next/static/BUILD_ID/pages/index.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.8c4b911330e3650a3bb5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.dcd3b906e1f4d8455e8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-c3e38c13c0e6434d744d.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_ssgManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_ssgManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for link.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2969add02d96c4018583.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false,"gip":true}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-51838dc5b2b8e0705281.js"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.9bb4b0fcebc580c6107b.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2969add02d96c4018583.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-c3e38c13c0e6434d744d.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_ssgManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_ssgManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/link.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.dcd3b906e1f4d8455e8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div><h3>A Link page!</h3><a href="/">Go to /</a></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/link","query":{},"buildId":"BUILD_ID","isFallback":false,"gip":true}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-51838dc5b2b8e0705281.js"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/link" src="/_next/static/BUILD_ID/pages/link.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.8c4b911330e3650a3bb5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.dcd3b906e1f4d8455e8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-c3e38c13c0e6434d744d.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_ssgManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_ssgManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Diff for withRouter.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2969add02d96c4018583.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false,"gip":true}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-51838dc5b2b8e0705281.js"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.9bb4b0fcebc580c6107b.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2969add02d96c4018583.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-c3e38c13c0e6434d744d.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_ssgManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_ssgManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/BUILD_ID/pages/_app.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/BUILD_ID/pages/withRouter.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.dcd3b906e1f4d8455e8b.module.js" as="script" crossorigin="anonymous"/><link rel="preload" href="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" as="script" crossorigin="anonymous"/></head><body><div id="__next"><div>I use withRouter</div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{"props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"BUILD_ID","isFallback":false,"gip":true}</script><script crossorigin="anonymous" nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" nomodule="" src="/_next/static/runtime/polyfills-51838dc5b2b8e0705281.js"></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/_app" src="/_next/static/BUILD_ID/pages/_app.module.js" crossorigin="anonymous" type="module"></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.js" crossorigin="anonymous" nomodule=""></script><script async="" data-next-page="/withRouter" src="/_next/static/BUILD_ID/pages/withRouter.module.js" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/webpack-4d739ac7b0d8f888ab18.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/webpack-d629b83a65f3e33fa99e.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/framework.5bb7f30f859f5f31359f.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.8c4b911330e3650a3bb5.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.dcd3b906e1f4d8455e8b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/runtime/main-c3e38c13c0e6434d744d.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/runtime/main-ab8c086291904aca6f0b.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_buildManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_buildManifest.module.js" async="" crossorigin="anonymous" type="module"></script><script src="/_next/static/BUILD_ID/_ssgManifest.js" async="" crossorigin="anonymous" nomodule=""></script><script src="/_next/static/BUILD_ID/_ssgManifest.module.js" async="" crossorigin="anonymous" type="module"></script></body></html>
\ No newline at end of file
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
buildDuration | 11s | 11s | |
nodeModulesSize | 55.2 MB | 55.2 MB |
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
main-HASH.js gzip | 6.27 kB | 6.27 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..ac5e.js gzip | 10.3 kB | N/A | N/A |
framework.a1..NSE.txt gzip | 220 B | 220 B | ✓ |
framework.a1..NSE.txt gzip | 220 B | 220 B | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
de003c3a9d30..e8e1.js gzip | N/A | 10.3 kB | N/A |
Overall change | 56.8 kB | 56.8 kB |
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.82 kB | 4.82 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.88 kB | N/A | N/A |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
de003c3a9d30..dule.js gzip | N/A | 6.88 kB | N/A |
Overall change | 51.5 kB | 51.5 kB |
Legacy Client Bundles (polyfills)
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.2 kB | 26.2 kB | ✓ |
Overall change | 26.2 kB | 26.2 kB | ✓ |
Client Pages
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
_app.js gzip | 1.23 kB | 1.23 kB | ✓ |
_error.js gzip | 3.12 kB | 3.12 kB | ✓ |
hooks.js gzip | 663 B | 663 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.06 kB | 2.06 kB | ✓ |
routerDirect.js gzip | 280 B | 280 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 7.85 kB | 7.85 kB | ✓ |
Client Pages Modern
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
_app.module.js gzip | 598 B | 598 B | ✓ |
_error.module.js gzip | 2.09 kB | 2.09 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.52 kB | ✓ |
routerDirect..dule.js gzip | 279 B | 279 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.37 kB | 5.37 kB | ✓ |
Client Build Manifests
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | 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 increase ⚠️
zeit/next.js canary | ijjk/next.js add/NEXT-175-manifest-fields | Change | |
---|---|---|---|
_error.js | 558 kB | 558 kB | ✓ |
404.html | 4.18 kB | 4.18 kB | ✓ |
hooks.html | 3.81 kB | 3.81 kB | ✓ |
index.js | 558 kB | 558 kB | ✓ |
link.js | 595 kB | 595 kB | |
routerDirect.js | 587 kB | 588 kB | |
withRouter.js | 587 kB | 588 kB | |
Overall change | 2.89 MB | 2.89 MB |
timneutkens
approved these changes
Apr 28, 2020
kodiakhq bot
pushed a commit
to vercel/vercel
that referenced
this pull request
May 1, 2020
As discussed this updates to leverage the new named regexes and route keys output in the `routes-manifest.json` to pass the dyname page values in the query to ensure we're handling edge cases with the new custom routes support Note: the `yarnPreferOffline` change is unrelated and was added to make debugging easier as the build can fail when using this option and the cache is invalid for some packages. x-ref: vercel/next.js#12250
kodiakhq bot
pushed a commit
that referenced
this pull request
Jun 23, 2020
This updates to rely on query values from the proxy when capable to ensure the correct values are provided. This does not remove the `x-now-route-matches` as this is still needed until the values are provided in the query instead for iSSG x-ref: vercel/vercel#4196 x-ref: #12250 x-ref: Tested against the following updated fixtures from vercel/vercel#4682 with https://github.com/ijjk/next-update-loader - 08-custom-routes-catchall - 10-export-cache-headers - 16-base-path - 22-ssg-v2 - 23-custom-routes-verbose
rokinsky
pushed a commit
to rokinsky/next.js
that referenced
this pull request
Jul 11, 2020
rokinsky
pushed a commit
to rokinsky/next.js
that referenced
this pull request
Jul 11, 2020
This updates to rely on query values from the proxy when capable to ensure the correct values are provided. This does not remove the `x-now-route-matches` as this is still needed until the values are provided in the query instead for iSSG x-ref: vercel/vercel#4196 x-ref: vercel#12250 x-ref: Tested against the following updated fixtures from vercel/vercel#4682 with https://github.com/ijjk/next-update-loader - 08-custom-routes-catchall - 10-export-cache-headers - 16-base-path - 22-ssg-v2 - 23-custom-routes-verbose
ofhouse
pushed a commit
to milliHQ/terraform-aws-next-js
that referenced
this pull request
Mar 13, 2021
As discussed this updates to leverage the new named regexes and route keys output in the `routes-manifest.json` to pass the dyname page values in the query to ensure we're handling edge cases with the new custom routes support Note: the `yarnPreferOffline` change is unrelated and was added to make debugging easier as the build can fail when using this option and the cache is invalid for some packages. x-ref: vercel/next.js#12250
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 named regex fields to the
routes-manifest
along with the keys for the route to allow building routes in@now/next
. This does not change any existing fields in theroutes-manifest
so should be a backwards compatible change requiring no manifest version bump.I also noticed while updating the tests one of our test pages had invalid links which are corrected in this PR also