-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathelectron.vite.config.ts
66 lines (65 loc) · 1.77 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import { resolve } from 'path';
import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({
main: {
plugins: [
externalizeDepsPlugin({
exclude: [
'@holochain/client',
'@holochain-open-dev/utils',
'nanoid',
'mime',
'@theweave/moss-types',
'@theweave/utils',
'@lightningrodlabs/we-rust-utils',
'@sinclair/typebox',
],
}),
],
build: {
watch: {
exclude: ['**/.cargo/**', '.cargo'],
},
},
},
preload: {
plugins: [externalizeDepsPlugin()],
build: {
rollupOptions: {
input: {
admin: resolve(__dirname, 'src/preload/admin.ts'),
splashscreen: resolve(__dirname, 'src/preload/splashscreen.ts'),
selectmediasource: resolve(__dirname, 'src/preload/selectmediasource.ts'),
walwindow: resolve(__dirname, 'src/preload/walwindow.ts'),
},
},
},
},
renderer: {
build: {
rollupOptions: {
input: {
admin: resolve(__dirname, 'src/renderer/index.html'),
splashscreen: resolve(__dirname, 'src/renderer/splashscreen.html'),
selectmediasource: resolve(__dirname, 'src/renderer/selectmediasource.html'),
walwindow: resolve(__dirname, 'src/renderer/walwindow.html'),
},
},
},
plugins: [
viteStaticCopy({
targets: [
{
src: resolve(__dirname, '../../node_modules/@shoelace-style/shoelace/dist/assets'),
dest: 'shoelace',
},
{
src: resolve(__dirname, 'we_logo.png'),
dest: 'dist/assets',
},
],
}),
],
},
});