You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amend behaviour for selecting path prefix in proc macro (#103)
We encountered an issue deploying the `examples/route-merge` directory,
insofar as it worked locally, and worked with `vc --prebuilt`, but
deploying via the Vercel build system by running `vercel deploy`
resulted in all the API routes panicing.
This happens because:
- The routes are properly formed and specified from the rust runtime
package (typescript side). Meaning we create the correct Vercel
functions.
- However, no routes are picked up by the proc macro.
The `vercel deploy` command only uploads the current directory into
Vercel. Meaning when built via the Vercel build system, the
`examples/route-merge` directory does not appear to be part of a cargo
workspace. The path prefix specified then does not point to
`examples/route-merge/api/**.rs`, but instead to
`examples/route-merge/examples/route-merge/api/**.rs`, meaning no
routing are created.
The fix for this is to fall back to acting as if no `path` is specified
in the case where `{path}/api/main.rs` cannot be found.
0 commit comments