-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
61 lines (60 loc) · 1.46 KB
/
electron.vite.config.ts
File metadata and controls
61 lines (60 loc) · 1.46 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
56
57
58
59
60
61
import path, { resolve } from "path";
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
import react from "@vitejs/plugin-react-swc";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
esbuild: {
drop: ["console", "debugger"],
},
resolve: {
alias: {
"@/main": resolve("src/main"),
"@/data": resolve("src/data"),
"@shared": resolve("src/shared"),
},
},
build: {
rollupOptions: {
external: [
"@libsql/client",
"@libsql/win32-x64-msvc",
"node-machine-id",
],
},
},
},
preload: {
esbuild: {
drop: ["console", "debugger"],
},
plugins: [externalizeDepsPlugin()],
},
renderer: {
assetsInclude: "src/renderer/assets/**",
esbuild: {
drop: ["console", "debugger"],
},
resolve: {
alias: {
"@renderer": resolve("src/renderer/src"),
"@shared": resolve("src/shared"),
"@": resolve("src/renderer/src"),
},
},
build: {
rollupOptions: {
input: {
index: path.resolve(__dirname, "src/renderer/index.html"),
splash: path.resolve(__dirname, "src/renderer/splash.html"),
"local-password": path.resolve(
__dirname,
"src/renderer/local-password.html",
),
},
},
},
plugins: [react(), tailwindcss()],
},
});