Spaces:
Paused
Paused
vite config with dev proxy to the server
Browse files- web/vite.config.js +12 -0
web/vite.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig } from 'vite';
|
| 2 |
+
import react from '@vitejs/plugin-react';
|
| 3 |
+
|
| 4 |
+
export default defineConfig({
|
| 5 |
+
plugins: [react()],
|
| 6 |
+
server: {
|
| 7 |
+
proxy: {
|
| 8 |
+
'/api': 'http://localhost:8080',
|
| 9 |
+
'/ws': { target: 'ws://localhost:8080', ws: true },
|
| 10 |
+
},
|
| 11 |
+
},
|
| 12 |
+
});
|