-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
32 lines (30 loc) · 879 Bytes
/
Copy pathvite.config.ts
File metadata and controls
32 lines (30 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vitest/config";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import path from "path";
const host = process.env.TAURI_DEV_HOST;
const platform = process.env.TAURI_ENV_PLATFORM;
const debug = process.env.TAURI_ENV_DEBUG;
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: platform === "windows" ? "chrome105" : "safari13",
minify: !debug ? "esbuild" : false,
sourcemap: !!debug,
},
resolve: {
conditions: ["browser"],
alias: {
$lib: path.resolve("./src/lib"),
},
},
});