import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import svgr from "vite-plugin-svgr";
import svgo from "vite-plugin-svgo";

export default defineConfig({
  base: "./",
  plugins: [react(), svgr(), svgo()],
  root: path.resolve(__dirname),
  build: {
    outDir: path.resolve(__dirname, "../../build/electron"),
    emptyOutDir: true,
    rollupOptions: {
      input: {
        main: path.resolve(__dirname, "index.html"),
      },
    },
  },
  server: {
    port: 5287,
  },
});
