next.js
7d952edc - Ensure bail out on ssr error in static generation (#68764)

Commit
1 year ago
Ensure bail out on ssr error in static generation (#68764) ### What It's regression introduced in #67703 where throwing error in client component page is not bailing out anymore in static generation. It was supposed to bail out the build, found by @gnoff Closes NDX-52 ### Why We're throwing the all the collected render errors for both RSC and SSR rendering error. But in #67703 we accidentally removed the collection of SSR rendering error into digested errors map ```js if (response.digestErrorsMap.size) { const buildFailingError = response.digestErrorsMap.values().next().value throw buildFailingError } ``` We add another check after above for SSR errors, if they're presented we'll bail with the 1st SSR error.
Author
Parents
Loading