Files
admin-front/vite.config.ts
T
2026-10-01 22:52:19 +03:00

24 lines
592 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: 5173,
proxy: {
// Бэкенд не настраивает CORS, поэтому в dev все запросы /api идут через прокси.
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
})