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:
co-authored by
Claude Opus 4.6
parent
63fd402083
commit
b906d8a2bd
@@ -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
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user