- Respond to WebSocket Ping frames with Pong for keepalive detection - Refactor WS handler to share sender between broadcast and recv tasks via Arc<Mutex> (required for pong responses from recv task) - Add vite production build config: source maps, manual chunk splitting for vendor/charts/query bundles Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
598 B
TypeScript
28 lines
598 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['react', 'react-dom', 'react-router-dom'],
|
|
charts: ['lightweight-charts', 'recharts'],
|
|
query: ['@tanstack/react-query'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|