20 lines
466 B
TypeScript
20 lines
466 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
|
|
// In dev, proxy API calls to the Go backend so the SPA and API share an origin
|
|
// (keeps the session cookie first-party).
|
|
export default defineConfig({
|
|
plugins: [svelte()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': 'http://localhost:8080',
|
|
'/healthz': 'http://localhost:8080',
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false,
|
|
},
|
|
});
|