import { defineConfig } from 'vite'; const apiTarget = process.env.QUALITY_DEV_API_TARGET || 'http://127.0.0.1:5281'; if (!/^http:\/\/127\.0\.0\.1:(5281|5283|5284|5285|5287)$/.test(apiTarget)) throw new Error('Unsupported local API target'); export default defineConfig({ server: { host: '127.0.0.1', port: 5280, strictPort: true, proxy: { '/api': { target: apiTarget, changeOrigin: false, }, }, }, });