electron.vite.config.mjs 791 B

12345678910111213141516171819202122232425262728293031
  1. import { resolve } from 'path'
  2. import UnoCSS from 'unocss/vite'
  3. import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
  4. import vue from '@vitejs/plugin-vue'
  5. export default defineConfig({
  6. main: {
  7. plugins: [externalizeDepsPlugin()]
  8. },
  9. preload: {
  10. plugins: [externalizeDepsPlugin()]
  11. },
  12. renderer: {
  13. resolve: {
  14. alias: {
  15. '~src': resolve('src/renderer/src'),
  16. '~ass': resolve('src/renderer/src/assets')
  17. }
  18. },
  19. plugins: [
  20. vue({
  21. template: {
  22. compilerOptions: {
  23. isCustomElement: (tag) => tag === 'webview',
  24. }
  25. }
  26. }),
  27. UnoCSS(),
  28. ],
  29. }
  30. })