trading-platform-frontend-v2/vite.config.ts
rckrdmrd 737303d177 Migración desde trading-platform/apps/frontend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:32:49 -06:00

56 lines
1.4 KiB
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/wallet': {
target: 'http://localhost:3090',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/wallet/, ''),
},
'/api/products': {
target: 'http://localhost:3091',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/products/, ''),
},
'/api/vip': {
target: 'http://localhost:3092',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/vip/, ''),
},
'/api/investment': {
target: 'http://localhost:3093',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/investment/, ''),
},
'/api/predictions': {
target: 'http://localhost:3094',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/predictions/, ''),
},
},
},
build: {
outDir: 'dist',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom', 'react-router-dom'],
query: ['@tanstack/react-query'],
state: ['zustand'],
},
},
},
},
});