Skip to content

feat(next): add cacheComponents support for PPR detection#13585

Merged
wyattjoh merged 2 commits intomainfrom
feat/next-cache-components-ppr-support
Jul 22, 2025
Merged

feat(next): add cacheComponents support for PPR detection#13585
wyattjoh merged 2 commits intomainfrom
feat/next-cache-components-ppr-support

Conversation

@wyattjoh
Copy link
Copy Markdown
Contributor

Summary

  • Adds support for experimental.cacheComponents configuration to enable PPR (Partial Pre-Rendering)
  • Extends existing PPR detection logic to include the new cacheComponents option alongside existing ppr: true and ppr: 'incremental' configurations

Changes

  • Modified isAppPPREnabled check in packages/next/src/index.ts to include experimental.cacheComponents === true
  • Added changeset documenting the new feature

Test plan

  • Verify existing PPR functionality remains unchanged
  • Test that setting experimental.cacheComponents = true enables PPR detection
  • Confirm integration with Next.js apps using the new configuration

wyattjoh added 2 commits July 21, 2025 20:19
Enable experimental.cacheComponents configuration to activate PPR
(Partial Pre-Rendering) alongside existing ppr configuration options.
@wyattjoh wyattjoh requested review from a team, huozhi, ijjk, timneutkens and ztanner as code owners July 22, 2025 03:45
@wyattjoh wyattjoh requested a review from brookemosby July 22, 2025 03:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 22, 2025

🦋 Changeset detected

Latest commit: 192a3d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@vercel/next Patch
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wyattjoh wyattjoh added this pull request to the merge queue Jul 22, 2025
Merged via the queue into main with commit 861d472 Jul 22, 2025
151 checks passed
@wyattjoh wyattjoh deleted the feat/next-cache-components-ppr-support branch July 22, 2025 16:38
github-merge-queue bot pushed a commit that referenced this pull request Jul 22, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/[email protected]

### Minor Changes

- Improve Fluid support
([#13589](#13589))

## [email protected]

### Patch Changes

- Updated dependencies
\[[`861d4723b91dabd697215ae214b95a7cbba5e6a7`](861d472),
[`205cba1c42ecaa2aec92a9839d2162557f44662e`](205cba1)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Add support for experimental.cacheComponents in PPR detection
([#13585](#13585))

Enables the experimental.cacheComponents configuration option to
activate PPR (Partial Pre-Rendering) alongside existing ppr
configuration options (true and 'incremental').

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jul 22, 2025
…cheComponents (#13595)

## Summary
This PR extends the condition for exporting
`getRequestHandlerWithMetadata` in the Next.js server launcher to also
support the experimental `cacheComponents` feature, not just PPR.

## Changes
- Modified the condition in `packages/next/src/server-launcher.ts` to
check for either `conf.experimental?.ppr` OR
`conf.experimental?.cacheComponents`
- This follows up on PR #13585 that added cacheComponents support for
PPR detection

## Test plan
- [x] Existing tests should continue to pass
- [x] The `getRequestHandlerWithMetadata` export should be available
when either `ppr` or `cacheComponents` is enabled in the experimental
config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants