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

fix(prerender): allow ignoring errors in prerender:generate hook #2610

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

danielroe
Copy link
Collaborator

@danielroe danielroe commented Jul 12, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

We currently allow skipping route generation in prerender:generate, but it's not possible to granularly ignore errors on a per-route basis. Instead we either turn off failOnError for the entire build or not.

This change allows the user (or integration) to ignore particular errors based on their own criteria, without disabling failOnError protection entirely.

You might also consider this an enhancement - feel free to amend πŸ™

background: was debugging some strange errors prerendering /_ipx routes that only occured in Vercel on my personal site - I am happy ignoring these but would like any other errors to be build-breaking ones.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe requested a review from pi0 July 12, 2024 13:58
@danielroe danielroe self-assigned this Jul 12, 2024
@pi0
Copy link
Member

pi0 commented Jul 16, 2024

(can we rebase it for v2?)

@danielroe danielroe changed the base branch from main to v2 July 16, 2024 16:41
@pi0 pi0 merged commit 077703c into v2 Jul 16, 2024
5 checks passed
@pi0 pi0 deleted the fix/ignoring-errors branch July 16, 2024 17:02
@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.

2 participants