-
Notifications
You must be signed in to change notification settings - Fork 26k
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
has field example seems wrong in next@canary #23415
Comments
This ensures we gather segments from the experimental has field when validating segments used in the destination to prevent the invalid segments in the destination error from showing incorrectly. This usage has been added to the custom-routes test suite to ensure the segments are passed correctly from the has field. Fixes: #23415 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added
#23588 doesn't appear to have fixed the example above that's also on https://nextjs.org/docs/api-reference/next.config.js/rewrites#header-cookie-and-query-matching |
thanks @ijjk this is a very exciting feature and I truly hope it gets to stable version |
Yeah, I cannot wait for this! |
This is a follow-up to #23588 to update to use a regex lexer to gather the named regex groups instead of attempting to gather them through executing the regex since it can fail to gather the regex groups when they are using specific matching. This also ensures we don't pass the value as a segment when value is defined and it doesn't use a capture group. Additional tests are added to cover these cases and documentation updated to reflect this. Closes: #23415 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added ## Documentation / Examples - [x] Make sure the linting passes
This should now be updated in |
This ensures we gather segments from the experimental has field when validating segments used in the destination to prevent the invalid segments in the destination error from showing incorrectly. This usage has been added to the custom-routes test suite to ensure the segments are passed correctly from the has field. Fixes: vercel#23415 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added
This is a follow-up to vercel#23588 to update to use a regex lexer to gather the named regex groups instead of attempting to gather them through executing the regex since it can fail to gather the regex groups when they are using specific matching. This also ensures we don't pass the value as a segment when value is defined and it doesn't use a capture group. Additional tests are added to cover these cases and documentation updated to reflect this. Closes: vercel#23415 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added ## Documentation / Examples - [x] Make sure the linting passes
This ensures we gather segments from the experimental has field when validating segments used in the destination to prevent the invalid segments in the destination error from showing incorrectly. This usage has been added to the custom-routes test suite to ensure the segments are passed correctly from the has field. Fixes: vercel#23415 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added
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. |
What version of Next.js are you using?
10.0.10-canary.11
What version of Node.js are you using?
12.2.0
What browser are you using?
Edge
What operating system are you using?
macOS
How are you deploying your application?
Not deploying
Describe the Bug
When following the recently added example provided in https://github.com/vercel/next.js/blob/canary/docs/api-reference/next.config.js/rewrites.md#header-cookie-and-query-matching for the
has
field with typequery
, the following error occurs when runningnext dev
ornext build
:Expected Behavior
I am not entirely sure on this one. I would love if
:page
was accessible there but I believe the example is incorrect.To Reproduce
Create a
next.config.js
file in the root folder and add this content:Run either
next build
ornext start
.The text was updated successfully, but these errors were encountered: