-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
33 lines (31 loc) · 964 Bytes
/
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
import {rmSync} from 'fs'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import electron from 'vite-electron-plugin'
import {join} from "path";
rmSync('dist/electron', {recursive: true, force: true})
export default defineConfig({
root: join(__dirname, '/src/app'),
plugins: [
vue({}),
electron({
include: ['src/electron'],
outDir: join(__dirname, '/dist')
}),
],
build: {
rollupOptions: {
input: {
index: join(__dirname, 'src/app/index.html'),
oauthSuccess: join(__dirname, 'src/app/oauth_success.html'),
oauthError: join(__dirname, 'src/app/oauth_error.html'),
},
},
outDir: join(__dirname, '/dist/app')
},
assetsInclude: "src/electron/assets/*",
clearScreen: false,
define: {
__APP_ENV__: JSON.stringify(process.env.NODE_ENV ?? 'development')
}
})