frontend/vite.config.js
timerzz 8eeb624ea2
All checks were successful
Build image / build (push) Successful in 29s
feat 添加供应商页面
2024-08-27 14:26:41 +08:00

82 lines
2.1 KiB
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: {
// '/storage/v1/products': {
// // target: 'https://ht.timerzz.com:20443/',
// target: 'http://192.168.31.163:31828/',
// changeOrigin: true,
// secure: false,
// ws: true,
// },
// '/storage/v1/push': {
// target: 'https://ht-dev.timerzz.com:20443/',
// // target: 'http://192.168.31.55:2280/',
// changeOrigin: true,
// secure: false,
// ws: true,
// },
// '/storage/v1/pushers': {
// target: 'https://ht-dev.timerzz.com:20443/',
// // target: 'http://192.168.31.55:2280/',
// changeOrigin: true,
// secure: false,
// ws: true,
// },
// '/storage/v1/watchers': {
// target: 'https://ht-dev.timerzz.com:20443/',
// // target: 'http://192.168.31.55:2280/',
// changeOrigin: true,
// secure: false,
// ws: true,
// },
// '/storage/v1/proxies': {
// target: 'https://ht-dev.timerzz.com:20443/',
// // target: 'http://192.168.31.55:2280/',
// changeOrigin: true,
// secure: false,
// ws: true,
// },
'/api/v1': {
target: 'https://ht.timerzz.com:20443/',
// target: 'http://192.168.31.55:2280/',
changeOrigin: true,
secure: false,
ws: true,
},
'/api/v2': {
target: 'http://localhost:8081/',
// target: 'http://192.168.31.55:2280/',
changeOrigin: true,
secure: false,
ws: true,
}
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, "./src")
}
}
})