mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-16 22:59:04 +02:00
* feat(desktop): brand dev build as Multica Canary with bundled icon pnpm dev:desktop ran under the stock Electron name and default icon, making it indistinguishable from any other Electron dev app in the dock. Set a Canary app name + userData path and point the macOS dock icon and BrowserWindow icon at the bundled resources/icon.png so the dev build is visually branded. * feat(desktop): allow overriding renderer port via DESKTOP_RENDERER_PORT 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. * feat(desktop): rebrand Electron.app Info.plist so dev shows Multica Canary app.setName() can't override the macOS menu bar title or Cmd+Tab label — those come from CFBundleName baked into the running bundle's Info.plist. Patch the bundled Electron.app's plist during `pnpm dev:desktop` so dev launches read "Multica Canary" everywhere, not "Electron". Idempotent; unlinks before rewriting so we don't mutate a pnpm-store inode shared with other projects.
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"],
|
|
},
|
|
},
|
|
});
|