18 lines
508 B
TypeScript
18 lines
508 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
port: 5174,
|
|
host: true,
|
|
// same-origin jak na produkcji: frontend woła względne /api i /health,
|
|
// vite dev proxy przekazuje na lokalne API (musi stać: docker compose w api/)
|
|
proxy: {
|
|
'/api': 'http://localhost:9002',
|
|
'/health': 'http://localhost:9002',
|
|
},
|
|
},
|
|
});
|