-
Notifications
You must be signed in to change notification settings - Fork 21
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
Catch-all routes aren't generated right when the name isn't a valid JS identifier but is a valid NextJS route #49
Comments
Thanks for reporting this @OliverDudgeon. Thinking on the solution, we could quote all user supplied segments, or try to determine the subset that aren’t valid JS identifiers. |
Out of curiosity, why do you prefer |
Nothing preventing this for me |
tatethurston
added a commit
that referenced
this issue
Aug 8, 2022
Merged
tatethurston
added a commit
that referenced
this issue
Aug 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have an route which catches all subpaths such as
"/api/as-api/[...as-proxy]"
the generated route is{ pathname: "/api/as-api/[...as-proxy]"; query: Query<{ as-proxy: string[] }> }
. Notice that there is a key,as-proxy
, which is missing quotes to allow it to be a valid object key.Using
v0.0.18
The text was updated successfully, but these errors were encountered: