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