Skip to content

Commit

Permalink
Turbopack HMR: Reload when recovering from server-side errors (#63434)
Browse files Browse the repository at this point in the history
Test Plan: `TURBOPACK=1 pnpm test-dev
test/development/basic/gssp-ssr-change-reloading/test/index.test.ts


Closes PACK-2767
  • Loading branch information
wbinnssmith committed Mar 18, 2024
1 parent a2e3b27 commit 1f5d317
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/next/src/client/page-bootstrap.ts
Expand Up @@ -82,6 +82,11 @@ export function pageBootrap(assetPrefix: string) {
break
}
case HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ONLY_CHANGES: {
if (RuntimeErrorHandler.hadRuntimeError) {
console.warn(REACT_REFRESH_FULL_RELOAD_FROM_ERROR)
performFullReload(null)
}

const { pages } = payload

// Make sure to reload when the dev-overlay is showing for an
Expand Down

0 comments on commit 1f5d317

Please sign in to comment.