refactor nginx

Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
Omar Sánchez Pizarro
2026-01-21 00:30:13 +01:00
parent ed2107086c
commit 53928328d4
11 changed files with 394 additions and 78 deletions

View File

@@ -2,7 +2,7 @@ import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { fileURLToPath, URL } from 'url';
export default defineConfig({
export default defineConfig(({ mode }) => ({
plugins: [vue()],
base: '/dashboard/',
resolve: {
@@ -12,7 +12,9 @@ export default defineConfig({
},
server: {
port: 3000,
proxy: {
host: true,
// Proxy solo para desarrollo local
proxy: mode === 'development' ? {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
@@ -21,7 +23,7 @@ export default defineConfig({
target: 'ws://localhost:3001',
ws: true,
},
},
} : undefined,
},
});
}));