import react from '@vitejs/plugin-react'; import { defineConfig } from 'vitest/config'; export default defineConfig({ plugins: [react()], server: { proxy: { '/ws': { target: 'ws://127.0.0.1:8787', ws: true, }, '/wordcloud-api': { target: process.env.WORDCLOUD_API_UPSTREAM || 'http://192.168.31.213:8000', changeOrigin: true, rewrite: (path) => path.replace(/^\/wordcloud-api/, ''), }, '/wordcloud-product-api': { target: 'http://127.0.0.1:8787', changeOrigin: true, rewrite: (path) => path.replace(/^\/wordcloud-product-api/, ''), }, }, }, test: { include: ['src/**/*.{test,spec}.{ts,tsx}'], environment: 'jsdom', globals: true, setupFiles: './src/test/setup.ts', css: true, }, });