Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ppr] Don't mark RSC requests as /_next/data requests (backport of #66249) #70083

Merged
merged 2 commits into from
Sep 13, 2024

Commits on Sep 13, 2024

  1. [ppr] Don't mark RSC requests as /_next/data requests (#66249)

    Old logic from the pages router was previously being hit during
    development. This was more apparent when PPR was enabled as it was
    mixing dynamic + static rendering in development which propagated to
    errors. This change ensures that requests that are made with `RSC: 1`
    are not marked as `/_next/data` URL's, and don't use the same logic
    paths.
    
    Previously it was a bit confusing because we used the variable
    `isDataReq` in a few places that made it hard to tell what it was
    referring to. In this case, the `isDataReq` is actually only used by the
    pages router. This renames the `isDataReq` to `isNextDataRequest` to
    make it clearer, as well as refactors to ensure that it's not used in
    the paths for app routes.
    
    Also to better represent the rendering modes the `supportsDynamicHTML`
    variable was renamed to `supportsDynamicResponse`.
    
    Fixes #66241
    wyattjoh committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    63baca2 View commit details
    Browse the repository at this point in the history
  2. fix-lint

    ijjk committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    66a9eaa View commit details
    Browse the repository at this point in the history