forked from beyond-all-reason/bar-lobby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.main.config.mts
31 lines (30 loc) · 1 KB
/
vite.main.config.mts
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
import { defineConfig } from "vite";
import path from "path";
// https://vitejs.dev/config
export default defineConfig({
resolve: {
alias: {
"@main": path.join(__dirname, "src/main"),
"@renderer": path.join(__dirname, "src/renderer"),
"@preload": path.join(__dirname, "src/preload"),
$: path.join(__dirname, "vendor"),
},
},
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, "src/main/main.ts"),
"parse-replay-worker": path.resolve(__dirname, "src/main/content/replays/parse-replay-worker.ts"),
"map-image-worker": path.resolve(__dirname, "src/main/content/maps/map-image-worker.ts"),
},
},
lib: {
entry: path.resolve(__dirname, "src/main/main.ts"),
formats: ["cjs"],
fileName(format, entryName) {
return `${entryName}.cjs`;
},
},
sourcemap: true,
},
});