Spaces:
Runtime error
Runtime error
use proxy to run dev mode
Browse files- frontend/vite.config.ts +11 -2
frontend/vite.config.ts
CHANGED
@@ -2,5 +2,14 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
|
2 |
import { defineConfig } from 'vite';
|
3 |
|
4 |
export default defineConfig({
|
5 |
-
plugins: [sveltekit()]
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import { defineConfig } from 'vite';
|
3 |
|
4 |
export default defineConfig({
|
5 |
+
plugins: [sveltekit()],
|
6 |
+
server: {
|
7 |
+
proxy: {
|
8 |
+
'^/settings|/queue_size|/stream': 'http://localhost:7860',
|
9 |
+
'/ws': {
|
10 |
+
target: 'ws://localhost:7860',
|
11 |
+
ws: true
|
12 |
+
}
|
13 |
+
},
|
14 |
+
}
|
15 |
+
});
|