39 lines
845 B
TypeScript
39 lines
845 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import basicSsl from '@vitejs/plugin-basic-ssl';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), basicSsl()],
|
|
server: {
|
|
host: '0.0.0.0', // Permite acceso desde tablets Samsung en la LAN
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
'/health': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:8000',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
target: 'es2020',
|
|
sourcemap: false,
|
|
chunkSizeWarningLimit: 600,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['react', 'react-dom'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|