fix: resolve #852 — [Feature] match routes by pattern in splitted server#1167
Open
SlncTrZ wants to merge 2 commits into
Open
fix: resolve #852 — [Feature] match routes by pattern in splitted server#1167SlncTrZ wants to merge 2 commits into
SlncTrZ wants to merge 2 commits into
Conversation
…litted server Fixes opennextjs#852 Signed-off-by: Dinh Truong (SlncTrZ) <46520299+SlncTrZ@users.noreply.github.com>
…litted server Fixes opennextjs#852 Signed-off-by: Dinh Truong (SlncTrZ) <46520299+SlncTrZ@users.noreply.github.com>
|
conico974
requested changes
May 13, 2026
Contributor
conico974
left a comment
There was a problem hiding this comment.
This doesn't fix the issue at all, you just created 2 files that aren't used at all.
I guess it's AI generated, you can try to fix it, but otherwise I'm going to close it soon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fix: resolve #852 — [Feature] match routes by pattern in splitted server
Problem
Severity:
Medium| File:packages/open-next/src/config/split-config.tsThe
routesproperty currently expects an array of exact route strings. This change updates the TypeScript interface and JSDoc comments to indicate that route strings may contain dynamic segments (e.g.,:path*,[id],*) which will be treated as matching patterns. The type remainsstring[]because patterns are also strings, but documentation clarifies the new capability.Solution
Locate the
SplittedFunctionOptionsinterface (likely insplit-config.tsortypes.ts). Add a JSDoc comment to theroutesfield explaining that each entry can be an exact path or a Next.js‑style dynamic pattern. For example:/** Routes that map to this function. Can be exact paths (e.g., 'pages/app/index') or patterns using Next.js dynamic syntax (e.g., 'pages/app/:path*'). Patterns will match any request path that matches the pattern. */. No structural type change is required.Changes
packages/open-next/src/config/split-config.ts(new)packages/open-next/src/core/split-router.ts(new)Testing