import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], publicDir: 'public', base: './', // Relatif path için server: { host: true, port: 5173, allowedHosts: true, // allow any host during dev for Docker/remote fs: { allow: ['..'] // Dışarıdaki dosyalara erişim } }, preview: { host: true, port: 4173, allowedHosts: true // prod preview'de tüm hostları (traefik + custom domain) kabul et }, build: { assetsDir: 'assets', chunkSizeWarningLimit: 2000, rollupOptions: { output: { manualChunks: { tesseract: ['tesseract.js'] } } } } });