-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathvite.config.ts
More file actions
53 lines (49 loc) · 1.27 KB
/
vite.config.ts
File metadata and controls
53 lines (49 loc) · 1.27 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { playwright } from "@vitest/browser-playwright";
// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [svelte()],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent vite from obscuring rust errors
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 6973,
strictPort: true,
watch: {
// 3. tell vite to ignore watching rust directories
ignored: ["**/src/**", "**/target/**"],
},
},
build: {
target: ["es2022", "chrome97", "edge97", "safari15"]
},
test: {
projects: [
{
extends: true,
test: {
name: "app",
include: ["app/**/*.test.ts"],
browser: {
provider: playwright(),
enabled: true,
headless: true,
instances: [{ browser: "chromium" }],
},
},
},
{
test: {
name: "e2e",
include: ["e2e/**/*.test.ts"],
testTimeout: 120000,
hookTimeout: 120000,
fileParallelism: false,
},
},
],
},
}));