-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
43 lines (42 loc) · 1.08 KB
/
vite.config.ts
File metadata and controls
43 lines (42 loc) · 1.08 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
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
root: "render",
build: {
outDir: "../dist",
emptyOutDir: true,
chunkSizeWarningLimit: 1000,
},
server: {
port: 5173,
proxy: {
"/api": {
target: "http://127.0.0.1:4322",
changeOrigin: true,
},
"/ws": {
target: "ws://127.0.0.1:4322",
ws: true,
changeOrigin: true,
},
},
watch: {
// Only watch files inside render/ for HMR.
// Without this, Vite reloads the app whenever the file tree
// panel creates/deletes/renames files anywhere in the project.
ignored: [
"**/node_modules/**",
"**/src-tauri/**",
"**/dist/**",
// Ignore anything that isn't a source file
(path: string) => {
// Always watch render/** (our actual source)
if (path.includes("render")) return false;
// Ignore everything else (user project files, etc.)
return true;
},
],
},
},
});