unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.77k stars 487 forks source link

routeRule '**' throws error on Vercel: Builder returned invalid routes: ["Route at index 4 has invalid `src` regular expression \"^**$\"."] #2463

Open MickL opened 3 months ago

MickL commented 3 months ago

Environment

nitropack: 2.9.6

Describe the bug

Not sure if this is a bug but a route rule that goes '**' works fine on dev but throws an error being deployed to Vercel:

Error: Builder returned invalid routes: ["Route at index 4 has invalid src regular expression \"^**$\"."]

It works when changing the rule to '/**'

Additional context

No response

Logs

No response

pi0 commented 3 months ago

I think we have to normalize all route rules to start with a leading slash here