2026-06-09 15:15:35 +03:30
|
|
|
import { fileURLToPath, URL } from 'node:url'
|
2026-06-09 06:41:28 +03:30
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
// Dev: the Vite dev server (5173) proxies API/health/openapi to the .NET web host (5180).
|
|
|
|
|
// Prod: `npm run build` emits ./dist, which the .NET publish step / Docker copies into wwwroot.
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react(), tailwindcss()],
|
2026-06-09 15:15:35 +03:30
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-06-09 06:41:28 +03:30
|
|
|
server: {
|
|
|
|
|
port: 5173,
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': { target: 'http://localhost:5180', changeOrigin: true },
|
|
|
|
|
'/health': { target: 'http://localhost:5180', changeOrigin: true },
|
|
|
|
|
'/openapi': { target: 'http://localhost:5180', changeOrigin: true },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|