aboutsummaryrefslogtreecommitdiffstats
path: root/vite.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'vite.config.js')
-rw-r--r--vite.config.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/vite.config.js b/vite.config.js
index 88ac65cb..79fe1130 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -12,12 +12,12 @@ const config = {
},
},
server: {
- proxy: {
- "/api": {
+ proxy: process.env.NODE_ENV === 'development' ? {
+ "/api/": {
target: "http://localhost:3119",
- rewrite: (path) => path.replace(/^\/api/, ""),
+ rewrite: (path) => path.replace(/^\/api\//, ""),
},
- },
+ } : undefined,
},
};