Closed OliverDudgeon closed 2 years ago
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 as-proxy
overasProxy
? The former will be less ergonomic in your code, and it’s not exposed to end users.
Nothing preventing this for me
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