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-09-15 13:32:13 +02:00
|
|
|
plugins: [externalizeDepsPlugin()],
|
2023-09-15 04:53:23 +02:00
|
|
|
},
|
|
|
|
preload: {
|
2023-09-15 13:32:13 +02:00
|
|
|
plugins: [externalizeDepsPlugin()],
|
2023-09-15 04:53:23 +02:00
|
|
|
},
|
|
|
|
renderer: {
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
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
|
|
|
})
|