Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Frontend Check (push) Has been cancelled
CI / Build Tauri (macOS) (push) Has been cancelled
CI / Build Tauri (macOS Intel) (push) Has been cancelled
CI / Build Tauri (Linux) (push) Has been cancelled
Includes server (Rust/Axum API proxy with voice management), Tauri desktop client with Svelte UI, bot-sdk, Docker infra (Synapse, PostgreSQL, Coturn, Nginx), and CI/CD pipeline.
29 lines
771 B
TypeScript
29 lines
771 B
TypeScript
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
import { defineConfig } from 'vite';
|
|
import sveltePreprocess from 'svelte-preprocess';
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
const isTauri = !!process.env.TAURI_DEV_HOST || !!process.env.TAURI_ENV_PLATFORM;
|
|
|
|
export default defineConfig({
|
|
plugins: [svelte({
|
|
preprocess: sveltePreprocess(),
|
|
})],
|
|
clearScreen: false,
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true,
|
|
host: host || false,
|
|
hmr: host ? { protocol: 'ws', host, port: 5174 } : undefined,
|
|
watch: isTauri ? { ignored: ['**/src-tauri/**'] } : undefined,
|
|
proxy: isTauri ? undefined : {
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
},
|
|
}); |