import type { ForgeConfig } from "@electron-forge/shared-types"; import { VitePlugin } from "@electron-forge/plugin-vite"; const config: ForgeConfig = { packagerConfig: { asar: true, // 索引器与示例文档作为额外资源,打包后位于 resources/knowledge。 extraResource: ["knowledge"], }, makers: [], plugins: [ new VitePlugin({ build: [ { entry: "main/index.ts", config: "vite.main.config.mts", target: "main", }, { entry: "preload/index.ts", config: "vite.preload.config.mts", target: "preload", }, ], renderer: [{ name: "main_window", config: "vite.renderer.config.mts" }], }), ], }; export default config;