-
Notifications
You must be signed in to change notification settings - Fork 0
/
electron.vite.config.ts
42 lines (41 loc) · 979 Bytes
/
electron.vite.config.ts
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
/// <reference types="vitest" />
import react from '@vitejs/plugin-react'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import { resolve } from 'path'
import { generateGitSquidKeysPlugin } from './plugins'
export default defineConfig(({ command }) => ({
main: {
envPrefix: 'SQUID_MAIN',
plugins: [externalizeDepsPlugin(), generateGitSquidKeysPlugin(command)],
build: {
copyPublicDir: true
}
},
preload: {
plugins: [externalizeDepsPlugin()]
},
renderer: {
resolve: {
alias: {
'@renderer': resolve('src/renderer/src')
}
},
plugins: [react()]
},
test: {
globals: true,
coverage: {
provider: 'istanbul', // or 'v8'
exclude: [
'out/**',
'**/main/index.ts',
'**/preload/index.ts',
'**/renderer/src/main.tsx',
'**/electron.vite.config.ts',
'plugins/**',
'**/types.ts',
'.eslintrc.cjs'
]
}
}
}))