mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-23 18:17:44 +02:00
Lets a second worktree run `pnpm dev:desktop` while a primary checkout already holds the default Vite dev port 5173 — required to actually exercise the "Multica Canary" branding in isolation.
30 lines
851 B
TypeScript
30 lines
851 B
TypeScript
import { resolve } from "path";
|
|
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
},
|
|
renderer: {
|
|
server: {
|
|
// Allow parallel worktrees to run `pnpm dev:desktop` side-by-side
|
|
// (e.g. Multica Canary alongside a primary checkout) by overriding
|
|
// the renderer port via env. Falls back to 5173 for the common case.
|
|
port: Number(process.env.DESKTOP_RENDERER_PORT) || 5173,
|
|
strictPort: true,
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve("src/renderer/src"),
|
|
},
|
|
dedupe: ["react", "react-dom"],
|
|
},
|
|
},
|
|
});
|