-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
29 lines (28 loc) · 969 Bytes
/
Copy pathelectron.vite.config.ts
File metadata and controls
29 lines (28 loc) · 969 Bytes
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
import { defineConfig } from 'electron-vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
main: {
build: {
outDir: 'out/main',
rollupOptions: {
// ctImportWorker is a separate entry (not an import reachable from
// index.ts) because it's loaded at runtime as a worker_thread
// script by its own file path, not imported as a normal module —
// see ctImportSafe.ts for why (the worker_thread safety net around
// importCheatTable). It needs to exist as its own standalone
// compiled .js file sitting next to index.js in out/main, not
// inlined into index.js's bundle.
input: {
index: 'src/main/index.ts',
ctImportWorker: 'src/main/ctImportWorker.ts'
}
}
}
},
preload: { build: { outDir: 'out/preload' } },
renderer: {
root: 'src/renderer',
build: { outDir: 'out/renderer' },
plugins: [react()]
}
})