2023-09-15 19:32:13 +08:00
|
|
|
import { resolve } from 'node:path'
|
2023-09-15 10:53:23 +08:00
|
|
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
2023-09-15 19:32:13 +08:00
|
|
|
import useEslint from 'vite-plugin-eslint'
|
|
|
|
import useUnoCSS from 'unocss/vite'
|
|
|
|
import postcssConfig from '@viarotel-org/postcss-config'
|
2023-09-15 10:53:23 +08:00
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
main: {
|
2023-10-11 18:54:41 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@root': resolve('./'),
|
|
|
|
},
|
|
|
|
},
|
2023-09-15 19:32:13 +08:00
|
|
|
plugins: [externalizeDepsPlugin()],
|
2023-09-15 10:53:23 +08:00
|
|
|
},
|
|
|
|
preload: {
|
2023-09-18 15:07:28 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@resources': resolve('resources'),
|
|
|
|
},
|
|
|
|
},
|
2023-09-15 19:32:13 +08:00
|
|
|
plugins: [externalizeDepsPlugin()],
|
2023-09-15 10:53:23 +08:00
|
|
|
},
|
|
|
|
renderer: {
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2023-10-11 18:54:41 +08:00
|
|
|
'@root': resolve('./'),
|
2023-09-15 19:32:13 +08:00
|
|
|
'@renderer': resolve('src/renderer/src'),
|
|
|
|
},
|
2023-09-15 10:53:23 +08:00
|
|
|
},
|
2023-09-15 19:32:13 +08:00
|
|
|
plugins: [useEslint(), vue(), useUnoCSS()],
|
|
|
|
css: {
|
|
|
|
postcss: postcssConfig(),
|
|
|
|
},
|
|
|
|
},
|
2023-09-15 10:53:23 +08:00
|
|
|
})
|