31 lines
696 B
TypeScript
31 lines
696 B
TypeScript
import { resolve } from "node:path";
|
|
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
build: {
|
|
rollupOptions: {
|
|
input: resolve(__dirname, "src/main/index.ts"),
|
|
},
|
|
},
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
build: {
|
|
rollupOptions: {
|
|
input: resolve(__dirname, "src/preload/index.ts"),
|
|
output: {
|
|
format: "cjs",
|
|
entryFileNames: "index.js",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
renderer: {
|
|
root: resolve(__dirname, "src/renderer"),
|
|
plugins: [react()],
|
|
},
|
|
});
|