frontend/vite.config.js

47 lines
1.0 KiB
JavaScript
Raw Normal View History

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: {
2024-05-15 13:07:16 +08:00
'/api/v1/products': {
// target: 'https://ht.timerzz.com:20443/',
target: 'http://192.168.31.163:31828/',
changeOrigin: true,
secure: false,
ws: true,
},
'/api/v1': {
2024-05-14 22:38:10 +08:00
target: 'https://ht.timerzz.com:20443/',
// target: 'http://192.168.31.55:2280/',
changeOrigin: true,
secure: false,
ws: true,
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, "./src")
}
}
})