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>
15 lines
369 B
TypeScript
15 lines
369 B
TypeScript
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
|
|
}
|
|
});
|