29 lines
684 B
TypeScript
29 lines
684 B
TypeScript
import { defineConfig, loadEnv } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd());
|
|
|
|
return {
|
|
build: {
|
|
outDir: 'dist',
|
|
},
|
|
plugins: [react()],
|
|
esbuild: {
|
|
minifyIdentifiers: false, // Отключаем переименование переменных
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ['@prisma/client', 'lucide-react'],
|
|
},
|
|
server: {
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: env.VITE_API_URL || 'http://localhost:5000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
historyApiFallback: true,
|
|
},
|
|
};
|
|
}); |