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

feat(vercel): allow fine-grained isr config via route rules #2780

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 7, 2024

This PR adds the ability to define isr route rule as an object:

{
  expiration?: number | false;
  group?: number;
  allowQuery?: string[];
  passQuery?: boolean;
}

Example:

export default defineNitroConfig({
  routeRules: {
    "/products/**": { isr: { allowQuery: ["q"] } },
  },
});

These route rules will be used to generate vercel prerender config

{
  "expiration": false,
  "allowQuery": [
    "q",
    "url"
  ]
}

@pi0 pi0 self-assigned this Oct 7, 2024
@pi0 pi0 changed the title feat(vercel): allow fine-gained isr config via route rules feat(vercel): allow fine-grained isr config via route rules Oct 7, 2024
@pi0
Copy link
Member Author

pi0 commented Oct 7, 2024

Merging to try on nightly.

@pi0 pi0 merged commit d356758 into v2 Oct 7, 2024
5 checks passed
@pi0 pi0 deleted the feat/vercel-isr-query branch October 7, 2024 14:08
@pi0 pi0 mentioned this pull request Oct 31, 2024
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.

1 participant