mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #669] [MERGED] fix: map route segment revalidate to Nitro routeRules SWR #757
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#757
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/669
Author: @Divkix
Created: 3/23/2026
Status: ✅ Merged
Merged: 3/29/2026
Merged by: @james-elicx
Base:
main← Head:fix/nitro-route-rules-swr📝 Commits (10+)
7e8701dfix: map route segment revalidate to Nitro routeRules SWRb5edd23fix: address review feedback for Nitro routeRules SWRef0597afix: format import statement in index.ts6edb174fix: remove unnecessary ?? {} in spread operator to satisfy lint247890ffix: prefix unused handler parameter with underscore to satisfy lint5ff1d4efix: nitro routeRules integration - duplicate execution, mkdirSync, type safety, and testsae50317fix: configure Nitro routeRules before build14c106efix: convert :param route patterns to /** globs for Nitro routeRules54d4ceafix(build): fix convertToNitroPattern regex for consecutive dynamic segmentsba0751bfix: map route params to correct rou3 wildcards in Nitro routeRules📊 Changes
3 files changed (+521 additions, -0 deletions)
View changed files
➕
packages/vinext/src/build/nitro-route-rules.ts(+132 -0)📝
packages/vinext/src/index.ts(+45 -0)➕
tests/nitro-route-rules.test.ts(+344 -0)📄 Description
Summary
generateNitroRouteRules()to convert ISR routes (App Routerexport const revalidate = Nand Pages RoutergetStaticPropswithrevalidate) to Nitro'srouteRulesformat withswrvaluesvinext:nitro-route-ruleswriteBundle hook that emits routeRules to.output/nitro.jsonwhen Nitro plugin is detectedFixes
Closes #648
Testing
generateNitroRouteRulesunit tests pass🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.