-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
Turbopack + pages router: recover from runtime errors by reloading #63024
Conversation
An iteration of #62359, this uses the module-local flag instead of a shared dedicated module for flagging runtime errors, correctly reloading the page when these occur. Test Plan: See now-passing tests in the manifest.
Tests Passed |
Stats from current PRDefault Build (Increase detected
|
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
buildDuration | 13.7s | 13.8s | |
buildDurationCached | 7.3s | 6.2s | N/A |
nodeModulesSize | 198 MB | 198 MB | |
nextStartRea..uration (ms) | 434ms | 435ms | N/A |
Client Bundles (main, webpack)
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
2453-HASH.js gzip | 30.5 kB | 30.5 kB | N/A |
3304.HASH.js gzip | 181 B | 181 B | ✓ |
3f784ff6-HASH.js gzip | 53.7 kB | 53.7 kB | N/A |
8299-HASH.js gzip | 5.04 kB | 5.04 kB | N/A |
framework-HASH.js gzip | 45.2 kB | 45.2 kB | ✓ |
main-app-HASH.js gzip | 242 B | 241 B | N/A |
main-HASH.js gzip | 32.2 kB | 32.2 kB | N/A |
webpack-HASH.js gzip | 1.68 kB | 1.68 kB | N/A |
Overall change | 45.4 kB | 45.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
_app-HASH.js gzip | 196 B | 197 B | N/A |
_error-HASH.js gzip | 184 B | 184 B | ✓ |
amp-HASH.js gzip | 505 B | 505 B | ✓ |
css-HASH.js gzip | 324 B | 325 B | N/A |
dynamic-HASH.js gzip | 2.5 kB | 2.5 kB | N/A |
edge-ssr-HASH.js gzip | 258 B | 258 B | ✓ |
head-HASH.js gzip | 352 B | 352 B | ✓ |
hooks-HASH.js gzip | 370 B | 371 B | N/A |
image-HASH.js gzip | 4.21 kB | 4.2 kB | N/A |
index-HASH.js gzip | 259 B | 259 B | ✓ |
link-HASH.js gzip | 2.67 kB | 2.67 kB | ✓ |
routerDirect..HASH.js gzip | 314 B | 312 B | N/A |
script-HASH.js gzip | 386 B | 386 B | ✓ |
withRouter-HASH.js gzip | 309 B | 309 B | ✓ |
1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
Overall change | 5.03 kB | 5.03 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
_buildManifest.js gzip | 481 B | 485 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
index.html gzip | 529 B | 529 B | ✓ |
link.html gzip | 541 B | 541 B | ✓ |
withRouter.html gzip | 524 B | 523 B | N/A |
Overall change | 1.07 kB | 1.07 kB | ✓ |
Edge SSR bundle Size
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
edge-ssr.js gzip | 95.1 kB | 95 kB | N/A |
page.js gzip | 3.07 kB | 3.07 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Middleware size
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
middleware-b..fest.js gzip | 626 B | 623 B | N/A |
middleware-r..fest.js gzip | 151 B | 151 B | ✓ |
middleware.js gzip | 25.5 kB | 25.5 kB | N/A |
edge-runtime..pack.js gzip | 839 B | 839 B | ✓ |
Overall change | 990 B | 990 B | ✓ |
Next Runtimes Overall increase ⚠️
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
app-page-exp...dev.js gzip | 171 kB | 171 kB | |
app-page-exp..prod.js gzip | 96.5 kB | 96.7 kB | |
app-page-tur..prod.js gzip | 98.2 kB | 98.5 kB | |
app-page-tur..prod.js gzip | 92.7 kB | 92.9 kB | |
app-page.run...dev.js gzip | 149 kB | 149 kB | |
app-page.run..prod.js gzip | 91.2 kB | 91.4 kB | |
app-route-ex...dev.js gzip | 21.3 kB | 21.3 kB | N/A |
app-route-ex..prod.js gzip | 15 kB | 15 kB | N/A |
app-route-tu..prod.js gzip | 15 kB | 15 kB | N/A |
app-route-tu..prod.js gzip | 14.8 kB | 14.8 kB | N/A |
app-route.ru...dev.js gzip | 20.9 kB | 21 kB | N/A |
app-route.ru..prod.js gzip | 14.8 kB | 14.8 kB | N/A |
pages-api-tu..prod.js gzip | 9.52 kB | 9.54 kB | N/A |
pages-api.ru...dev.js gzip | 9.8 kB | 9.81 kB | N/A |
pages-api.ru..prod.js gzip | 9.52 kB | 9.54 kB | N/A |
pages-turbo...prod.js gzip | 22.3 kB | 22.3 kB | N/A |
pages.runtim...dev.js gzip | 22.9 kB | 23 kB | N/A |
pages.runtim..prod.js gzip | 22.3 kB | 22.3 kB | N/A |
server.runti..prod.js gzip | 50.5 kB | 50.6 kB | |
Overall change | 749 kB | 751 kB |
build cache
vercel/next.js canary | vercel/next.js wbinnssmith/error-recovery-2 | Change | |
---|---|---|---|
0.pack gzip | 1.56 MB | 1.56 MB | N/A |
index.pack gzip | 105 kB | 105 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Diff details
Diff for middleware.js
Diff too large to display
Diff for edge-ssr.js
Diff too large to display
Diff for link-HASH.js
@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[4644],
{
- /***/ 1794: /***/ function (
+ /***/ 8959: /***/ function (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/link",
function () {
- return __webpack_require__(2378);
+ return __webpack_require__(311);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 5435: /***/ function (module, exports) {
+ /***/ 2145: /***/ function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -33,32 +33,32 @@
});
}
_export(exports, {
- ACTION_FAST_REFRESH: function () {
- return ACTION_FAST_REFRESH;
- },
- ACTION_NAVIGATE: function () {
- return ACTION_NAVIGATE;
+ PrefetchKind: function () {
+ return PrefetchKind;
},
- ACTION_PREFETCH: function () {
- return ACTION_PREFETCH;
+ PrefetchCacheEntryStatus: function () {
+ return PrefetchCacheEntryStatus;
},
ACTION_REFRESH: function () {
return ACTION_REFRESH;
},
+ ACTION_NAVIGATE: function () {
+ return ACTION_NAVIGATE;
+ },
ACTION_RESTORE: function () {
return ACTION_RESTORE;
},
- ACTION_SERVER_ACTION: function () {
- return ACTION_SERVER_ACTION;
- },
ACTION_SERVER_PATCH: function () {
return ACTION_SERVER_PATCH;
},
- PrefetchCacheEntryStatus: function () {
- return PrefetchCacheEntryStatus;
+ ACTION_PREFETCH: function () {
+ return ACTION_PREFETCH;
},
- PrefetchKind: function () {
- return PrefetchKind;
+ ACTION_FAST_REFRESH: function () {
+ return ACTION_FAST_REFRESH;
+ },
+ ACTION_SERVER_ACTION: function () {
+ return ACTION_SERVER_ACTION;
},
isThenable: function () {
return isThenable;
@@ -110,7 +110,7 @@
/***/
},
- /***/ 742: /***/ function (module, exports, __webpack_require__) {
+ /***/ 6923: /***/ function (module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -122,7 +122,7 @@
return getDomainLocale;
},
});
- const _normalizetrailingslash = __webpack_require__(9515);
+ const _normalizetrailingslash = __webpack_require__(4251);
const basePath =
/* unused pure expression or super */ null && (false || "");
function getDomainLocale(path, locale, locales, domainLocales) {
@@ -146,7 +146,7 @@
/***/
},
- /***/ 7569: /***/ function (module, exports, __webpack_require__) {
+ /***/ 987: /***/ function (module, exports, __webpack_require__) {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -163,17 +163,17 @@
const _react = /*#__PURE__*/ _interop_require_default._(
__webpack_require__(959)
);
- const _resolvehref = __webpack_require__(3433);
- const _islocalurl = __webpack_require__(5594);
- const _formaturl = __webpack_require__(1357);
- const _utils = __webpack_require__(1784);
- const _addlocale = __webpack_require__(866);
- const _routercontextsharedruntime = __webpack_require__(162);
- const _approutercontextsharedruntime = __webpack_require__(853);
- const _useintersection = __webpack_require__(1462);
- const _getdomainlocale = __webpack_require__(742);
- const _addbasepath = __webpack_require__(9110);
- const _routerreducertypes = __webpack_require__(5435);
+ const _resolvehref = __webpack_require__(1419);
+ const _islocalurl = __webpack_require__(2623);
+ const _formaturl = __webpack_require__(7016);
+ const _utils = __webpack_require__(5943);
+ const _addlocale = __webpack_require__(2318);
+ const _routercontextsharedruntime = __webpack_require__(4829);
+ const _approutercontextsharedruntime = __webpack_require__(8676);
+ const _useintersection = __webpack_require__(8341);
+ const _getdomainlocale = __webpack_require__(6923);
+ const _addbasepath = __webpack_require__(639);
+ const _routerreducertypes = __webpack_require__(2145);
const prefetched = new Set();
function prefetch(router, href, as, options, appOptions, isAppRouter) {
if (false) {
@@ -594,7 +594,7 @@
/***/
},
- /***/ 1462: /***/ function (module, exports, __webpack_require__) {
+ /***/ 8341: /***/ function (module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -607,7 +607,7 @@
},
});
const _react = __webpack_require__(959);
- const _requestidlecallback = __webpack_require__(3921);
+ const _requestidlecallback = __webpack_require__(1611);
const hasIntersectionObserver =
typeof IntersectionObserver === "function";
const observers = new Map();
@@ -720,7 +720,7 @@
/***/
},
- /***/ 2378: /***/ function (
+ /***/ 311: /***/ function (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -736,7 +736,7 @@
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
__webpack_require__(1527);
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ =
- __webpack_require__(3639);
+ __webpack_require__(2075);
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default =
/*#__PURE__*/ __webpack_require__.n(
next_link__WEBPACK_IMPORTED_MODULE_1__
@@ -767,12 +767,12 @@
/***/
},
- /***/ 3639: /***/ function (
+ /***/ 2075: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(7569);
+ module.exports = __webpack_require__(987);
/***/
},
@@ -783,7 +783,7 @@
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(0, [2888, 9774, 179], function () {
- return __webpack_exec__(1794);
+ return __webpack_exec__(8959);
});
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for 2453-HASH.js
Diff too large to display
Diff for main-HASH.js
Diff too large to display
Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-exp..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page.runtime.dev.js
failed to diff
Diff for app-page.runtime.prod.js
Diff too large to display
Diff for app-route-ex..ntime.dev.js
Diff too large to display
Diff for app-route-ex..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route.runtime.dev.js
Diff too large to display
Diff for app-route.ru..time.prod.js
Diff too large to display
Diff for pages-api-tu..time.prod.js
Diff too large to display
Diff for pages-api.runtime.dev.js
Diff too large to display
Diff for pages-api.ru..time.prod.js
Diff too large to display
Diff for pages-turbo...time.prod.js
Diff too large to display
Diff for pages.runtime.dev.js
Diff too large to display
Diff for pages.runtime.prod.js
Diff too large to display
Diff for server.runtime.prod.js
Diff too large to display
An iteration of #62359, this uses the module-local flag instead of a shared dedicated module for flagging runtime errors, correctly reloading the page when these occur.
Test Plan: See now-passing tests in the manifest.
Closes PACK-2690