import { defineConfig } from "tsdown"; const shared = { format: "cjs" as const, outDir: "dist-electron", sourcemap: true, outExtensions: () => ({ js: ".cjs" }), deps: { neverBundle: ["electron"], }, }; export default defineConfig([ { ...shared, entry: ["src/main.ts"], clean: true, deps: { ...shared.deps, alwaysBundle: (id: string) => id.startsWith("@mosaiciq/"), }, }, { ...shared, entry: ["src/preload.ts"], }, ]);