-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvite.config.ts
More file actions
42 lines (40 loc) · 859 Bytes
/
Copy pathvite.config.ts
File metadata and controls
42 lines (40 loc) · 859 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
33
34
35
36
37
38
39
40
41
42
import { defineConfig, type PluginOption } from "vite-plus";
import react from "@vitejs/plugin-react";
const host = process.env.TAURI_DEV_HOST;
export default defineConfig({
define: {
process: { env: {} },
},
plugins: [...react()] as PluginOption[],
resolve: {
tsconfigPaths: true,
},
fmt: {
ignorePatterns: ["dist/**", "src-tauri"],
},
lint: {
ignorePatterns: ["dist/**", "src-tauri"],
options: {
denyWarnings: true,
typeAware: true,
typeCheck: true,
},
},
clearScreen: false,
server: {
port: 5173,
strictPort: true,
host: host ?? false,
hmr: host
? {
protocol: "ws",
host: host,
port: 5173,
}
: undefined,
watch: {
// 3. tell vite to ignore watching `src-tauri``
ignored: ["**/src-tauri/**"],
},
},
});