rsnext/test/e2e/app-dir/use-search-params
Jimmy Lai c52cb5ad83
feat(app): add experimental.missingSuspenseWithCSRBailout (#57642)
### 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>
2024-01-10 00:26:24 +01:00
..
app feat(app): add experimental.missingSuspenseWithCSRBailout (#57642) 2024-01-10 00:26:24 +01:00
next.config.js feat(app): add experimental.missingSuspenseWithCSRBailout (#57642) 2024-01-10 00:26:24 +01:00
use-search-params.test.ts feat(app): add experimental.missingSuspenseWithCSRBailout (#57642) 2024-01-10 00:26:24 +01:00