Fixes ECONNREFUSED ::1:3000 on Windows where localhost resolves to IPv6 but Fastify binds to IPv4 (0.0.0.0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
318 B
TypeScript
17 lines
318 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': 'http://127.0.0.1:3000',
|
|
'/socket.io': {
|
|
target: 'http://127.0.0.1:3000',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|