17 lines
359 B
TypeScript
17 lines
359 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
'/ws': {
|
|
target: 'ws://localhost:5050',
|
|
ws: true,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/ws/, '')
|
|
}
|
|
}
|
|
}
|
|
})
|