c52cb5ad83
### What? This PR adds a new flag called `experimental.missingSuspenseWithCSRBailout`. ### Why? Via this PR we can break a build when calling `useSearchParams` without wrapping it in a suspense boundary. If no suspense boundaries are present, Next.js must avoid doing SSR and defer the entire page's rendering to the client. This is not a great default. Instead, we will now break the build so that you are forced to add a boundary. ### How? Add an experimental flag. If a `BailoutToCSRError` error is thrown and this flag is enabled, the build should fail and log an error, instead of showing a warning and bail the entire page to client-side rendering. Closes NEXT-1770 --------- Co-authored-by: Balázs Orbán <info@balazsorban.com> Co-authored-by: Wyatt Johnson <accounts+github@wyattjoh.ca> |
||
---|---|---|
.. | ||
app | ||
next.config.js | ||
use-search-params.test.ts |