-
Notifications
You must be signed in to change notification settings - Fork 50
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
Rewrites Not Working as Expected #121
Comments
I managed to rewrite the path with the following {
"rewrites": [
{ "source": "/simple", "destination": "/api/simple.rs" },
{ "source": "/complex", "destination": "/api/complex.rs" },
{ "source": "/user/:id", "destination": "/api/user/[id].rs" }
],
"functions": {
"api/**/*.rs": {
"runtime": "[email protected]"
}
}
} However, this doesn't seem to work for the {
"rewrites": [{ "source": "/(.*)", "destination": "/api/main.rs" }],
"functions": {
"api/main.rs": {
"runtime": "[email protected]"
}
}
} With this configuration, when I navigate to the route
|
Hi @rajput-hemant - thanks for raising this. From your examples it looks like we don't support both rewrites and function bundling at the same time. I'll have a look into this though 🙏 |
@dglsparsons Thanks for your quick response and for looking into this. I'm hopeful that this issue can be fixed, as having both rewrites and function bundling would be a valuable addition. |
It appears that rewrites are not functioning as expected. Here's my
vercel.json
configuration:Additionally, when I navigate to an API route, I receive the following error when running
vc dev
:The text was updated successfully, but these errors were encountered: