import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { entries } from './build/alias' export default defineConfig({ resolve: { alias: entries }, plugins: [ vue() ], server: { proxy: { '/gov_main_api': { target: 'http://121.40.133.115:8580', changeOrigin: true, rewrite: path => path.replace(new RegExp(`^/gov_main_api`), '/gov_main_api') }, '/node-szzt': { target: 'http://172.16.208.13:4001', changeOrigin: true, rewrite: path => path.replace(new RegExp(`^/node-szzt`), '/api') }, '/jx_zc_industry_api': { target: 'http://172.16.208.12:18320', changeOrigin: true, rewrite: path => path.replace(new RegExp(`^/jx_zc_industry_api`), '/jx_zc_industry_api') }, } } })