Spaces:
Sleeping
Sleeping
Create frontend/vite.config.js
Browse files- frontend/vite.config.js +12 -0
frontend/vite.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig } from "vite";
|
| 2 |
+
import react from "@vitejs/plugin-react";
|
| 3 |
+
|
| 4 |
+
// IMPORTANT: proxy API calls to backend when running both inside one container
|
| 5 |
+
export default defineConfig({
|
| 6 |
+
plugins: [react()],
|
| 7 |
+
server: {
|
| 8 |
+
proxy: {
|
| 9 |
+
"/api": "http://127.0.0.1:8000"
|
| 10 |
+
}
|
| 11 |
+
}
|
| 12 |
+
});
|