When I try to run the app in the dev environment I get this error:
ERROR build.target option is required in the electron vite main config.
Is my first time using electron and electron-vite so I'm probably missing somethig basic in any case I tried to configure the electron.vite.config.js by looking at the examples in the repo.
In the documentation and the examples I can't find any useful hint about that build.target option, is that really mandatory as the error suggest?
This is my config
import { defineConfig } from 'electron-vite';
import { resolve } from 'path';
export default defineConfig({
main: {
// Main process entry point
entry: 'src/main/index.js',
build: {
outDir: 'dist/main',
},
},
preload: {
// Preload script entry point
entry: 'src/preload/index.js',
build: {
outDir: 'dist/preload',
},
},
renderer: {
// Renderer process entry point
entry: 'src/renderer/index.js',
root: resolve(__dirname, 'src/renderer'),
build: {
outDir: 'dist/renderer',
},
},
});
Describe the bug
When I try to run the app in the dev environment I get this error:
ERROR build.target option is required in the electron vite main config.
Is my first time using electron and electron-vite so I'm probably missing somethig basic in any case I tried to configure the electron.vite.config.js by looking at the examples in the repo. In the documentation and the examples I can't find any useful hint about that build.target option, is that really mandatory as the error suggest? This is my config
Electron-Vite Version
2.3
Electron Version
5.2.4
Vite Version
5.4
Validations