frontend/vite.config.js
timerzz 43e2dff6a3
Some checks failed
Build image / build (push) Failing after 17s
feat 从之前的服务中将前端分离
2024-05-12 15:53:54 +08:00

40 lines
833 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'
import path from 'path'
import Components from 'unplugin-vue-components/vite';
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
UnoCSS(),
Components({
resolvers: [
AntDesignVueResolver({
importStyle: false, // css in js
}),
],
}),
],
server:{
open: true,
proxy: {
'/api/v1': {
target: 'http://172.25.168.160:2280/',
// target: 'http://192.168.31.55:2280/',
changeOrigin: true,
secure: false,
ws: true,
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, "./src")
}
}
})