import { defineConfig } from 'vite'; import { svelte } from '@sveltejs/vite-plugin-svelte'; // In dev, API calls are proxied to a locally running panel (cargo run -p scopenet-panel). const target = process.env.PANEL_URL ?? 'http://localhost:8080'; export default defineConfig({ plugins: [svelte()], server: { port: 5173, proxy: { '/api': target, '/files': target, '/uploads': target, }, }, build: { target: 'es2022', cssCodeSplit: false, chunkSizeWarningLimit: 800, }, });