Initial commit

This commit is contained in:
poignatov
2025-12-29 20:01:55 +03:00
commit 4f8a793377
63 changed files with 13655 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
export default defineConfig(({ mode }) => {
// Загружаем переменные окружения из корня проекта
// Сначала пробуем корневой .env, затем локальный
const rootEnv = loadEnv(mode, resolve(process.cwd(), '..'), '')
const localEnv = loadEnv(mode, process.cwd(), '')
// Объединяем переменные (локальные имеют приоритет)
const env = { ...rootEnv, ...localEnv, ...process.env }
return {
plugins: [react()],
server: {
host: '0.0.0.0',
port: parseInt(env.VITE_PORT || '3000', 10),
proxy: {
// Proxy API requests to backend
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
// Proxy other API endpoints
'/playlife-feed': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
'/d2dc349a-0d13-49b2-a8f0-1ab094bfba9b': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
'/projects': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
'/project': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
}
}
}
})