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

Add support for dynamicIO experiment to route.ts modules #70208

Merged
merged 1 commit into from
Sep 18, 2024

Commits on Sep 18, 2024

  1. Add support for dynamicIO experiment to route.ts modules

    `dyanmicIO` enables a semantic where any uncached IO will be excluded from prerenders. Before PPR this means any uncached IO would bail out of static generation at build time and during revalidates. Route hanlders have a similar ability to be statically generated at build and revlidate time however we recently changed the behavior to only be enabled if you explicitly opt into this using an API like `export const revalidate` or `export const dynamic = "force-static"`. With dynamic IO though we don't really need to be this restrictive. For one those configs are going to be non-operational eventually with dynamicIO but additionally almost nothing would be static if it didn anything non-trivially static or if it was already opted into caching.
    
    This commit updates the static generation rules for when `dynamicIO` is on to continue to try to statically generate GET route handlers. It also implements the logic for excluding IO and for when you use dynamic apis like `cookies()`.
    gnoff committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    3527113 View commit details
    Browse the repository at this point in the history