-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
55 lines (54 loc) · 1.33 KB
/
electron.vite.config.ts
File metadata and controls
55 lines (54 loc) · 1.33 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
50
51
52
53
54
55
// @ts-nocheck
import path from 'node:path';
import { defineConfig } from 'electron-vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
main: {
ssr: {
external: ['@eclipse-zenoh/zenoh-ts']
},
optimizeDeps: {
exclude: ['@eclipse-zenoh/zenoh-ts']
},
build: {
sourcemap: true,
outDir: 'out/main',
rollupOptions: {
external: ['@eclipse-zenoh/zenoh-ts'],
input: path.resolve(__dirname, 'apps/desktop/src/main/main.ts')
}
}
},
preload: {
build: {
sourcemap: true,
outDir: 'out/preload',
rollupOptions: {
input: path.resolve(__dirname, 'apps/desktop/src/preload/index.ts')
}
}
},
renderer: {
root: path.resolve(__dirname, 'apps/web'),
plugins: [react()],
resolve: {
alias: {
'@assets': path.resolve(__dirname, 'assets'),
'@shared': path.resolve(__dirname, 'packages/core/src/shared'),
'@core': path.resolve(__dirname, 'packages/core/src')
}
},
publicDir: path.resolve(__dirname, 'assets/web'),
server: {
port: 5173,
strictPort: true
},
build: {
outDir: path.resolve(__dirname, 'out/renderer'),
emptyOutDir: true,
rollupOptions: {
input: path.resolve(__dirname, 'apps/web/index.html')
}
}
}
});