27 lines
637 B
TypeScript
27 lines
637 B
TypeScript
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/, ''),
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
include: ['src/**/*.{test,spec}.{ts,tsx}'],
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: './src/test/setup.ts',
|
|
css: true,
|
|
},
|
|
});
|