1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { resolve } from 'path'
- import UnoCSS from 'unocss/vite'
- import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
- import vue from '@vitejs/plugin-vue'
- export default defineConfig({
- main: {
- plugins: [externalizeDepsPlugin()]
- },
- preload: {
- plugins: [externalizeDepsPlugin()]
- },
- renderer: {
- resolve: {
- alias: {
- '~src': resolve('src/renderer/src'),
- '~ass': resolve('src/renderer/src/assets'),
- '~api': resolve('src/renderer/src/api/modules'),
- '~store': resolve('src/renderer/src/store/modules'),
- }
- },
- plugins: [
- vue({
- template: {
- compilerOptions: {
- isCustomElement: (tag) => tag === 'webview',
- }
- }
- }),
- UnoCSS(),
- ],
- server: {
- proxy: {
- '/api': {
- ws: true,
- changeOrigin: true,
- //target: 'http://127.0.0.1:8014',
- target: 'http://39.108.216.210:8014',
- rewrite: (path) => path.replace(new RegExp('^/api'), '/'),
- },
- },
- },
- }
- })
|