-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
43 lines (41 loc) · 1.03 KB
/
electron.vite.config.ts
File metadata and controls
43 lines (41 loc) · 1.03 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
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { fileURLToPath } from 'node:url';
/** Resolve a path relative to this config file, regardless of cwd. */
const r = (p: string) => fileURLToPath(new URL(p, import.meta.url));
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
build: {
rollupOptions: {
input: r('app/packages/desktop-main/src/electron-entry.ts'),
output: {
format: 'es',
},
},
},
},
preload: {
plugins: [externalizeDepsPlugin()],
build: {
rollupOptions: {
input: r('app/packages/desktop-preload/src/preload.ts'),
},
},
},
renderer: {
root: r('app/packages/web'),
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': r('app/packages/web/src'),
},
},
build: {
rollupOptions: {
input: r('app/packages/web/index.html'),
},
},
},
});