feat: add tauri
Some checks failed
TrafficCue CI / check (push) Failing after 55s
TrafficCue CI / build (push) Successful in 50s

This commit is contained in:
Cfp
2025-08-06 11:24:33 +02:00
parent f52f98907b
commit cc1d5ba32e
27 changed files with 5110 additions and 0 deletions

View File

@ -3,8 +3,32 @@ import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import path from "path";
const host = process.env.TAURI_DEV_HOST;
export default defineConfig({
plugins: [tailwindcss(), svelte()],
clearScreen: false,
server: {
port: 5173,
strictPort: true,
host: host || false,
hmr: host ? {
protocol: "ws",
host,
port: 1421
} : undefined,
watch: {
ignored: ["**/src-tauri/**"]
}
},
envPrefix: ["VITE_", "TAURI_ENV_*"],
build: {
target: process.env.TAURI_ENV_PLATFORM == "windows"
? "chrome105"
: "safari13",
minify: !process.env.TAURI_ENV_DEBUG ? "esbuild" : false,
sourcemap: !!process.env.TAURI_ENV_DEBUG
},
resolve: {
alias: {
$lib: path.resolve("./src/lib"),