-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
89 lines (85 loc) · 2.07 KB
/
Copy pathelectron.vite.config.ts
File metadata and controls
89 lines (85 loc) · 2.07 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { defineConfig } from "electron-vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "node:path";
const srcAlias = {
"@": path.resolve(__dirname, "./src"),
};
const mainExternalDeps = [
"electron",
"better-sqlite3",
"node-pty",
"@anthropic-ai/claude-agent-sdk",
"@vscode/ripgrep",
];
const preloadExternalDeps = [
"electron",
];
export default defineConfig({
main: {
resolve: {
alias: srcAlias,
},
build: {
externalizeDeps: {
include: mainExternalDeps,
},
rolldownOptions: {
external: mainExternalDeps,
input: {
index: path.resolve(__dirname, "electron/main.ts"),
"host-service": path.resolve(__dirname, "electron/host-service.ts"),
// Standalone stdio proxy — compiled separately so it can be
// executed by `node` outside the Electron process.
"stave-mcp-stdio-proxy": path.resolve(__dirname, "electron/main/stave-mcp-stdio-proxy.ts"),
},
output: {
format: "es",
entryFileNames: (chunkInfo) =>
chunkInfo.name === "stave-mcp-stdio-proxy" ? "[name].mjs" : "[name].js",
},
},
},
},
preload: {
resolve: {
alias: srcAlias,
},
build: {
externalizeDeps: {
include: preloadExternalDeps,
},
rolldownOptions: {
external: preloadExternalDeps,
input: {
index: path.resolve(__dirname, "electron/preload.ts"),
"lens-guest": path.resolve(__dirname, "electron/lens-guest-preload.ts"),
},
output: {
format: "cjs",
entryFileNames: "[name].js",
},
},
},
},
renderer: {
root: ".",
plugins: [react(), tailwindcss()],
server: {
host: "127.0.0.1",
port: 4174,
strictPort: true,
watch: {
ignored: ["**/.stave/**"],
},
},
resolve: {
alias: srcAlias,
},
build: {
rolldownOptions: {
input: path.resolve(__dirname, "index.html"),
},
},
},
});