// File: nuxt.config.ts
vite: {
server: {
proxy: {
'/api': {
target: 'http://192.168.40.100:8080',
changeOrigin: true,
secure: false,
rewrite: (path) => {
console.log(path)
return path.replace(/^\/api/, '')
},
},
},
},
For development I use config as above to proxy request to local backend server. But in prod I need to use the real backend server url. How do I set it in nuxt.config.ts or should I set it somewhere else?