-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
49 lines (47 loc) · 1.16 KB
/
Copy pathelectron.vite.config.ts
File metadata and controls
49 lines (47 loc) · 1.16 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import { resolve } from 'path';
import type { ServerOptions } from 'vite';
import solid from 'vite-plugin-solid';
const devServerWatch: NonNullable<ServerOptions['watch']> = {
ignored: [
'**/.git/**',
'**/.gitnexus/**',
'**/.kilo/**',
'**/.venv/**',
'**/.worktrees/**',
'**/coverage/**',
'**/dist/**',
'**/node_modules/**',
'**/out/**',
],
...(process.platform === 'linux' && process.env.VESSEL_DEV_NATIVE_WATCH !== '1'
? { interval: 300, usePolling: true }
: {}),
};
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
},
preload: {
plugins: [externalizeDepsPlugin({ exclude: ['@mozilla/readability'] })],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'src/preload/index.ts'),
'content-script': resolve(__dirname, 'src/preload/content-script.ts'),
},
},
},
},
renderer: {
plugins: [solid()],
server: {
watch: devServerWatch,
},
build: {
rollupOptions: {
input: './src/renderer/index.html',
},
},
},
});