Vite proxy not working in SPA mode (Nuxt 3.5.2) #33660
Unanswered
resuscitate
asked this question in
Questions
Replies: 1 comment 1 reply
-
|
its a known issue they work on a Patch to fix this |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
Problem Description
I'm using Nuxt 3.5.2 in SPA mode (
ssr: false).My goal is to proxy API requests during development using Vite's
server.proxyconfig.However, the proxy doesn't work: all
/apirequests are sent to my Nuxt frontend port instead of being correctly proxied.Related Configuration
nuxt.config.ts (partial):
package.json (partial):
Expected Behavior
/apirequests should be proxied to the backend server, not to Nuxt's dev server.Actual Behavior
/apirequests go to Nuxt's frontend server (localhost:3041) and return the app's HTML, not backend API data./api:Additional Details
Environment
Is Vite proxy supported for Nuxt3 SPA mode?
Is there a workaround for proxying API requests in Nuxt3 SPA, or am I missing something in configuration?
Beta Was this translation helpful? Give feedback.
All reactions