electricity_bill_calc_recha.../vite.config.ts
2024-07-22 15:09:42 +08:00

28 lines
623 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
envDir: './',
publicDir: "/recharge-print",
base: './',
server: {
port: 3001,
proxy: {
'/api': {
target: `http://localhost:8000/api`,
changeOrigin: true,
secure: false,
rewrite: path => path.replace(/^\/api/, "")
},
'/test': {
target: `http://127.0.0.1:8081`,
changeOrigin: true,
secure: false,
rewrite: path => path.replace(/^\/test/, "")
}
}
}
})