Files
glchat/web/vite.config.ts
T

42 lines
1.3 KiB
TypeScript
Raw Normal View History

import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
sourcemap: false,
target: 'es2022',
// SDK LiveKit (~520 КБ) подгружается отдельным чанком только при входе в
// голосовую комнату, поэтому порог предупреждения поднят осознанно.
chunkSizeWarningLimit: 600,
},
server: {
port: 5173,
proxy: {
'/api': 'http://127.0.0.1:8080',
'/healthz': 'http://127.0.0.1:8080',
'/readyz': 'http://127.0.0.1:8080',
// Файлы аватаров/иконок отдаёт тот же инстанс.
'/files': 'http://127.0.0.1:8080',
// Шлюз Фазы 1: WebSocket на том же origin.
'/gateway': { target: 'ws://127.0.0.1:8080', ws: true },
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./tests/setup.ts'],
include: ['tests/**/*.test.{ts,tsx}'],
css: false,
},
});