public
anord
read
Ledger
Why work hard when you can work easier?
Languages
Repository composition by tracked source files.
TypeScript
86%
CSS
10%
SQL
3%
Shell
1%
HTML
0%
Trace
apps/web/vite.config.ts
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
import { defineConfig, loadEnv } from "vite";
2
import react from "@vitejs/plugin-react";
4
export default defineConfig(({ mode }) => {
5
const env = loadEnv(mode, process.cwd(), "");
6
const apiTarget = env.LEDGER_API_URL || "http://localhost:4000";
7
const allowedHosts =
8
env.LEDGER_ALLOWED_HOSTS === "*"
9
? true
10
: (env.LEDGER_ALLOWED_HOSTS || "")
11
.split(",")
12
.map((value) => value.trim())
13
.filter(Boolean);
15
return {
16
plugins: [react()],
17
server: {
18
port: 5173,
19
allowedHosts,
20
proxy: {
21
"/api": {
22
target: apiTarget,
23
changeOrigin: true
24
},
25
"/health": {
26
target: apiTarget,
27
changeOrigin: true
28
},
29
"/mcp": {
30
target: apiTarget,
31
changeOrigin: true
32
}
33
}
34
}
35
};
36
});