80 lines
1.9 KiB
JavaScript
80 lines
1.9 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';
|
|
import VueRouter from 'unplugin-vue-router/vite';
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
VueRouter({
|
|
routesFolder: 'src/views'
|
|
}),
|
|
UnoCSS(),
|
|
Components({
|
|
resolvers: [
|
|
AntDesignVueResolver({
|
|
importStyle: false, // css in js
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
server:{
|
|
open: true,
|
|
proxy: {
|
|
'/api/v1': {
|
|
target: 'https://ht.timerzz.com:20443/',
|
|
// target: 'http://192.168.31.55:2280/',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
},
|
|
'/api/v2/sellers': {
|
|
target: 'http://localhost:8081/',
|
|
// target: 'http://192.168.31.55:2280/',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
},
|
|
'/api/v2/seller': {
|
|
target: 'http://localhost:8083/',
|
|
// target: 'http://192.168.31.55:2280/',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
},
|
|
'/api/v2/providers': {
|
|
target: 'http://localhost:8080/',
|
|
// target: 'http://192.168.31.55:2280/',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
},
|
|
'/api/v2/provider': {
|
|
target: 'http://172.21.195.130:8082/',
|
|
// target: 'http://192.168.31.55:2280/',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
},
|
|
'/api/v2/articles': {
|
|
target: 'http://localhost:8085/',
|
|
// target: 'http://192.168.31.55:2280/',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
}
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, "./src")
|
|
}
|
|
}
|
|
})
|