AIx_Smarttalk/electron.vite.config.mjs

40 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-07-08 16:24:56 +08:00
import { resolve } from 'path'
// const path = require('path')
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from "vite-plugin-windicss"
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()]
},
preload: {
plugins: [externalizeDepsPlugin()]
},
renderer: {
resolve: {
alias: {
'@': resolve('./src/renderer/src'),
// '@': path.join(__dirname, './src/renderer/src'),
}
},
server: {
proxy: {
'/dev-api': {
2024-07-10 20:21:22 +08:00
target: 'http://27.128.240.72:7865',
// target: 'http://192.168.2.52:7863',
2024-07-08 16:24:56 +08:00
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
},
'/profile': {
// target: 'http://27.128.240.72:7865',
target: 'https://cqyy.ysaix.com:7868',
changeOrigin: true
2024-07-08 16:24:56 +08:00
}
},
},
plugins: [vue(), WindiCSS()],
assetsInclude:('**/*.woff', '**/*.woff2', '**/*.ttf'),
}
})