19 lines
681 B
TypeScript
19 lines
681 B
TypeScript
|
|
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()],
|
||
|
|
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 },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
})
|