Files
Atomizer/atomizer-dashboard/frontend/vite.config.ts

34 lines
800 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '0.0.0.0', // Bind to all interfaces (IPv4 and IPv6)
port: 3003,
strictPort: false, // Allow fallback to next available port
proxy: {
'/api': {
target: 'http://127.0.0.1:8001', // Backend port
changeOrigin: true,
secure: false,
ws: true,
}
}
},
build: {
rollupOptions: {
output: {
manualChunks: {
// Separate React and core libs
vendor: ['react', 'react-dom', 'react-router-dom'],
// Recharts in its own chunk
recharts: ['recharts']
}
}
},
chunkSizeWarningLimit: 600
}
})