Files
lux_fiscal/frontend/vite.config.ts
T
lauadminandClaude Sonnet 5 2664cb8213 Initial commit: backend scaffold, auth, frontend login
- FastAPI + SQLAlchemy async + Alembic + Postgres backend
- Auth: JWT access + rotating refresh tokens, argon2, roles, audit log
- React 19 + Vite frontend: login page, protected route, auth context
- Docker Compose: postgres, redis, migrate, api, worker (placeholder), frontend/nginx

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 15:07:15 +03:00

28 lines
862 B
TypeScript

import path from 'node:path'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(import.meta.dirname, 'src'),
},
},
server: {
port: 5173,
proxy: {
// Бэкенд слушает на 8000 (см. docker-compose.yml). Запросы идут по
// относительному пути /api/v1/... — тот же приём работает и в проде,
// где /api проксирует nginx. Благодаря этому фронтенд нигде не хранит
// абсолютный адрес API и CORS не нужен вообще.
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
},
},
},
})