-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
37 lines (35 loc) · 793 Bytes
/
electron.vite.config.ts
File metadata and controls
37 lines (35 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { defineConfig } from 'electron-vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
main: {
build: {
// https://electron-vite.org/guide/dev#dependencies-vs-devdependencies
// For the main process and preload, the best practice is to externalize dependencies and only bundle our own code.
target: 'node22.18',
sourcemap: true,
},
},
preload: {
build: {
target: 'node22.18',
sourcemap: true,
rollupOptions: {
output: {
format: 'cjs',
},
},
},
},
renderer: {
plugins: [react()],
build: {
target: 'chrome140',
sourcemap: true,
chunkSizeWarningLimit: 3e6,
},
server: {
port: 3001,
host: '127.0.0.1',
},
},
});