import { defineConfig } from 'vite'; import { svelte } from '@sveltejs/vite-plugin-svelte'; export default defineConfig({ plugins: [svelte()], server: { proxy: { // Defaults to tern-server's dev bind address (see server/.env.example). // Override with TERN_API when the server runs on another port or host. // ws: the live-update socket at /api/ws goes through the same proxy. '/api': { target: process.env.TERN_API ?? 'http://127.0.0.1:8080', ws: true }, }, }, });