2025-08-13 13:33:43 +08:00
|
|
|
import { resolve } from 'path'
|
2025-08-16 11:34:37 +08:00
|
|
|
import { defineConfig, externalizeDepsPlugin, bytecodePlugin } from 'electron-vite'
|
2025-08-13 13:33:43 +08:00
|
|
|
import vue from '@vitejs/plugin-vue'
|
2025-08-13 14:44:53 +08:00
|
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
|
|
|
import Components from 'unplugin-vue-components/vite'
|
|
|
|
|
import { TDesignResolver } from '@tdesign-vue-next/auto-import-resolver'
|
2025-08-13 13:33:43 +08:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
main: {
|
2025-08-14 13:12:04 +08:00
|
|
|
plugins: [
|
|
|
|
|
externalizeDepsPlugin({
|
|
|
|
|
exclude: ['@electron-toolkit/utils']
|
2025-08-16 11:34:37 +08:00
|
|
|
}),
|
|
|
|
|
bytecodePlugin()
|
2025-08-14 13:12:04 +08:00
|
|
|
]
|
2025-08-13 13:33:43 +08:00
|
|
|
},
|
|
|
|
|
preload: {
|
2025-08-14 13:12:04 +08:00
|
|
|
plugins: [
|
|
|
|
|
externalizeDepsPlugin({
|
|
|
|
|
exclude: ['@electron-toolkit/preload']
|
2025-08-16 11:34:37 +08:00
|
|
|
}),
|
|
|
|
|
bytecodePlugin()
|
2025-08-14 13:12:04 +08:00
|
|
|
]
|
2025-08-13 13:33:43 +08:00
|
|
|
},
|
|
|
|
|
renderer: {
|
2025-08-13 14:44:53 +08:00
|
|
|
plugins: [
|
|
|
|
|
vue(),
|
|
|
|
|
AutoImport({
|
|
|
|
|
resolvers: [
|
|
|
|
|
TDesignResolver({
|
|
|
|
|
library: 'vue-next'
|
|
|
|
|
})
|
|
|
|
|
]
|
|
|
|
|
}),
|
|
|
|
|
Components({
|
|
|
|
|
resolvers: [
|
|
|
|
|
TDesignResolver({
|
|
|
|
|
library: 'vue-next'
|
|
|
|
|
})
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
],
|
2025-08-13 13:33:43 +08:00
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@renderer': resolve('src/renderer/src')
|
|
|
|
|
}
|
2025-08-13 14:44:53 +08:00
|
|
|
}
|
2025-08-13 13:33:43 +08:00
|
|
|
}
|
|
|
|
|
})
|