-
-
Notifications
You must be signed in to change notification settings - Fork 206
Expand file tree
/
Copy pathcli.vite.ts
More file actions
30 lines (29 loc) · 747 Bytes
/
cli.vite.ts
File metadata and controls
30 lines (29 loc) · 747 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
30
import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import ConditionalCompile from 'vite-plugin-conditional-compiler'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin(), ConditionalCompile()],
resolve: {
// src
alias: {
src: resolve(__dirname, 'src')
}
},
build: {
target: 'node18',
sourcemap: true,
rollupOptions: {
input: {
index: resolve(__dirname, 'src/cli/index.ts'),
fake: resolve(__dirname, 'src/cli/fake.ts')
},
output: {
entryFileNames: 'ecb_cli.js',
format: 'cjs',
dir: resolve(__dirname, 'cli/out/')
}
}
}
}
})