Migración desde workspace-v2/projects/template-saas/apps/frontend Este repositorio es parte del estándar multi-repo v2 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
40 lines
959 B
TypeScript
40 lines
959 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3001',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// Vendor chunks - split by functionality
|
|
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
|
|
'vendor-query': ['@tanstack/react-query'],
|
|
'vendor-ui': ['lucide-react', 'clsx', 'react-hot-toast'],
|
|
'vendor-forms': ['react-hook-form'],
|
|
'vendor-charts': ['recharts'],
|
|
'vendor-utils': ['axios', 'date-fns', 'zustand'],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 600,
|
|
},
|
|
});
|