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
Builds work locally, deployment to Vercel does not.
Describe the bug
URL's are correctly generated using the baseURL: /docs/logo.svg, however they are still served from the root directory as opposed to the base URL, resulting in a 404. The same applies to /docs/_nuxt/ assets.
Works fine with a local build, but not when deployed on Vercel.
We found the solution in our case. Might be related to that.
The nitro server itself expects to run and serve the app on a sub-path, which works fine.
If the Kubernetes ingress is not set to have its base rewrite also on the sub-path, the two configurations do not match.
For us, setting the rewrite target to the subfolder of the running app did the trick to serve correctly.
would be great to add an additional option to the nuxt config to handle situations, where we can not access configurations, to set the deployments to root and then do not redirect the frontend to root, but stay on the sub-path
Environment
Reproduction
https://stackblitz.com/edit/github-w6rohg?file=nuxt.config.ts
Builds work locally, deployment to Vercel does not.
Describe the bug
URL's are correctly generated using the baseURL:
/docs/logo.svg
, however they are still served from the root directory as opposed to the base URL, resulting in a 404. The same applies to/docs/_nuxt/
assets.Works fine with a local build, but not when deployed on Vercel.
Additional context
Potentially related: unjs/nitro#1348
No response
Logs
No response
The text was updated successfully, but these errors were encountered: