Parsing of next.config.js rewrites' has objects value key
#35848
|
👋 I was wondering how the The docs are not entirely clear about this. Thanks in advance. – Nick |
Answered by
thibautsabot
Apr 4, 2022
Replies: 1 comment 1 reply
|
Hello! Yes they are regexp, you can find the related code here: https://github.com/vercel/next.js/blob/canary/packages/next/lib/load-custom-routes.ts#L360 It's using Value is |
1 reply
Answer selected by
nickrttn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
Yes they are regexp, you can find the related code here: https://github.com/vercel/next.js/blob/canary/packages/next/lib/load-custom-routes.ts#L360
It's using
matchAll.Value is
string | undefined.If it's a string, it'll be used as a regex to capture a specific part of the value.
If it's not defined, it'll match anything.