Files
elegalsoftware/apps/web/vite.config.ts
T

37 lines
829 B
TypeScript
Raw Normal View History

2026-04-26 02:42:42 -04:00
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'node:path';
export default defineConfig({
plugins: [react()],
// VITE_* vars live in the monorepo root .env alongside the API's config.
envDir: path.resolve(__dirname, '../..'),
2026-04-26 02:42:42 -04:00
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
build: {
outDir: 'dist',
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
'vendor-ui': ['framer-motion', 'lucide-react'],
'vendor-charts': ['recharts'],
},
},
},
},
});