This commit is contained in:
digua
2025-11-26 13:57:24 +08:00
commit 49ecd8fc1d
31 changed files with 8670 additions and 0 deletions

59
electron.vite.config.ts Normal file
View File

@@ -0,0 +1,59 @@
import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'electron/main/index.ts'),
},
},
},
},
preload: {
plugins: [externalizeDepsPlugin()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'electron/preload/index.ts'),
},
},
},
},
renderer: {
resolve: {
alias: {
'@': resolve('src/'),
'~': resolve('src/'),
},
},
plugins: [
vue(),
ui({
ui: {
colors: {
primary: 'green',
neutral: 'slate',
},
},
}),
],
root: 'src/',
build: {
sourcemap: false,
rollupOptions: {
input: {
index: resolve(__dirname, 'src/index.html'),
},
},
},
server: {
host: '0.0.0.0',
port: 3400,
},
},
})