Files
AgentCompany/electron.vite.config.ts
T
ZacharyZhang-NY 60178ceafa chore(adapter): delete adapter packages and drop build wiring
Removes the four workspace adapter packages (claude-local, codex-local,
gemini-local, adapter-utils) now that all runtime provider dispatch lives
in @mariozechner/pi-ai + pi-agent-core + pi-coding-agent. Refreshes the
lockfile, drops bundledMainDependencies from the Vite config, and adds
pi-coding-agent as a direct dependency for the worker's coding tools.
2026-04-17 02:20:46 -04:00

58 lines
1.4 KiB
TypeScript

import { resolve } from "node:path";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
resolve: {
alias: {
"@shared": resolve("src/shared"),
"@main": resolve("src/main"),
},
},
build: {
rollupOptions: {
input: {
index: resolve("src/main/index.ts"),
worker: resolve("src/main/worker/worker-entry.ts"),
},
},
},
},
preload: {
// zod is bundled into preload because preload runs as sandboxed CJS
// and cannot resolve externalized ESM deps at runtime. Inlining keeps
// IPC Zod validation working inside the preload layer.
plugins: [externalizeDepsPlugin({ exclude: ["zod"] })],
resolve: {
alias: {
"@shared": resolve("src/shared"),
"@preload": resolve("src/preload"),
},
},
build: {
rollupOptions: {
input: {
index: resolve("src/preload/index.ts"),
},
output: {
format: "cjs",
entryFileNames: "[name].js",
chunkFileNames: "chunks/[name]-[hash].js",
},
},
},
},
renderer: {
resolve: {
alias: {
"@shared": resolve("src/shared"),
"@renderer": resolve("src/renderer"),
},
},
plugins: [react(), tailwindcss()],
},
});