import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  server: {
    port: 5173,
    proxy: {
      '/api': {
        target: 'http://localhost:8001',
        changeOrigin: true,
        ws: true,
        // Sync operations can run for hours (1M+ rows from SAP).
        // Default http-proxy timeout is ~60s — remove it.
        timeout: 0,
        proxyTimeout: 0,
      },
    },
  },
})
