setup vite proxy for development

This commit is contained in:
Joel Mathew Thomas
2025-03-18 01:53:53 +05:30
parent 40b71c3fdb
commit ba18a7a27f
3 changed files with 14 additions and 6 deletions
+8
View File
@@ -4,4 +4,12 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
},
},
},
})