Feature request: need `params` field in route
Feature request
Is your feature request related to a problem? Please describe.
We need params field in route data to distinguish which is for pathname and search string.
for example of route rule /project/[project_id],
url /project/3, url /project?project_id=3, /project/3?project_id=3 makes same parsed query field in route data.
Describe the solution you'd like
Add params field in route object.
for example of route rule /project/[project_id],
url /project/3 => { query: {}, params: { project_id: '3' } }
url /project?project_id=3 => { query: { project_id: '3' }, params: {} }
url /project/3?project_id=3 => { query: { project_id: '3' }, params: { project_id: '3' } }
Additional context
Generally, query string is optional for deciding page route but params(that make up pathname ex. post_id, etc) are necessary, especially in file-base routing system like nextjs. So I think it should be handled separately.
The routing is merged in query on purpose as a proxy could handle the pattern matching eg for the serverless target. We're not planning to change this currently.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.