Fix electron-builder: remove type:module, use vite.config.mts instead

The "type": "module" in package.json caused tsup to emit .cjs files instead
of .js, breaking the electron-builder entry point check. Using .mts extension
for vite config achieves ESM for Vite without affecting the rest of the package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-02-28 06:28:45 +01:00
co-authored by Claude Opus 4.6
parent 63fd402083
commit b906d8a2bd
2 changed files with 0 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
export default defineConfig({
plugins: [react()],
base: "./",
root: path.resolve(__dirname, "src/renderer"),
publicDir: path.resolve(__dirname, "assets"),
build: {
outDir: path.resolve(__dirname, "build/renderer"),
emptyOutDir: true
}
});