39 lines
934 B
TypeScript
39 lines
934 B
TypeScript
import { resolve } from 'path'
|
|
import { defineConfig, externalizeDepsPlugin, bytecodePlugin } from 'electron-vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import tailwindcss from 'tailwindcss'
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
plugins: [externalizeDepsPlugin(), bytecodePlugin()]
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin(), bytecodePlugin()]
|
|
},
|
|
renderer: {
|
|
resolve: {
|
|
alias: {
|
|
'@renderer': resolve('src/renderer/src'),
|
|
'@store': resolve('src/renderer/src/store'),
|
|
'@utils': resolve('src/renderer/src/utils'),
|
|
'@api': resolve('src/renderer/src/api')
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
}
|
|
}
|
|
},
|
|
plugins: [vue()],
|
|
css: {
|
|
postcss: {
|
|
plugins: [tailwindcss]
|
|
}
|
|
}
|
|
}
|
|
})
|