fix: preserve route group context in interception route rewrites (#67034)
When two route groups each define an intercepting route for the same path (e.g., (group1)/@modal/(.)shared and (group2)/@modal/(.)shared), both produce identical rewrite rules because normalizeAppPath strips route group context. Only the first group's interception works. This fix: - Adds a denormalizedAppPaths parameter to generateInterceptionRoutesRewrites so the function can access route group context that's lost during normalization - When multiple route groups map to the same normalized interception path, generates separate rewrites with more specific Next-Url header regexes based on sibling pages within each group - Sorts rewrites by header regex specificity so more specific patterns are matched first - Passes denormalized paths from build and dev server call sites Note: the rewrite-level disambiguation is correct, but a separate build issue causes both route group variants to be bundled with the same component (the first group's). Full end-to-end fix requires additional changes in the build pipeline's page deduplication logic.
Showing
Please
register
or
sign in
to comment