-
-
Notifications
You must be signed in to change notification settings - Fork 435
/
vite.config.ts
78 lines (75 loc) · 1.75 KB
/
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
67
68
69
70
71
72
73
74
75
76
77
78
/* eslint-disable @typescript-eslint/naming-convention */
import * as path from "node:path";
import {defineConfig} from "vite";
import electron from "vite-plugin-electron";
export default defineConfig({
plugins: [
electron([
{
entry: {
index: "app/main",
},
vite: {
build: {
sourcemap: true,
rollupOptions: {
external: ["electron", /^electron\//, /^gatemaker\//],
},
ssr: true,
},
resolve: {
alias: {
"zulip:remote": "electron/main",
},
},
ssr: {
noExternal: true,
},
},
},
{
entry: {
preload: "app/renderer/js/preload.ts",
},
vite: {
build: {
sourcemap: "inline",
rollupOptions: {
external: ["electron", /^electron\//],
},
},
},
},
{
entry: {
renderer: "app/renderer/js/main.ts",
},
vite: {
build: {
sourcemap: true,
rollupOptions: {
external: ["electron", /^electron\//],
},
},
resolve: {
alias: {
"zulip:remote": "@electron/remote",
},
},
},
},
]),
],
build: {
outDir: "dist-electron",
sourcemap: true,
rollupOptions: {
input: {
renderer: path.join(__dirname, "app/renderer/main.html"),
network: path.join(__dirname, "app/renderer/network.html"),
about: path.join(__dirname, "app/renderer/about.html"),
preference: path.join(__dirname, "app/renderer/preference.html"),
},
},
},
});